Limit search to available items
Book Cover
Author Hartmann, Mads

Title Professional Scala : Combine Object-Oriented and Functional Programming to Build High-performance Applications
Published Birmingham : Packt Publishing Ltd, 2018


Description 1 online resource (186 pages)
Contents Intro; Preface; Setting up the Development Environment; Simple Program; Definitions: Packages, Imports, and Objects; Object Definition; The main Method; Inside main; Structure of a Scala Project; Basic sbt Commands; Activity: Performing Basic Operations with sbt: Build, Run, Package; IDE; Activity: Loading and Running a Sample Project in the IDE; REPL; Obtaining the Time Request from Our Chatbot Program; Base Syntax; Base Syntax for Definitions; Base Syntax for Expressions; Unit Testing; Adding a Test to Our Project; Inside Tests; Running Tests for Chatbot; Summary; Basic Language Features
Objects, Classes, and TraitsObject; Classes; Equality and Case Classes; Pattern Matching; Traits; Self-Types; Special Classes; OO in Our Chatbot; Decoupling Logic and Environment; Sealed Traits and Algebraic Datatypes; Function Calls; Syntax Goodies; Named Parameters; Default Parameters; Currying Forms (Multiple Argument Lists); Special Magic Methods; Implementing + in CartesianPoint; Parameter-Passing Mode; By Value; By Name; By Need; Creating a Runnable Construction; Printing the log Argument to the Console and File; Summary; Functions; Functions; Function Values
Function from an OO Point of ViewConversions; Defining and Measuring the Time of a Unit Function; Syntax Sugar in a Function Definition; Partial Functions; Exploring Pattern Matching; Binding a Sequence of Variables in the Pattern Matcher; Partial Functions in Practice; Representing ChatbotMode as a Partial Function; Implementing RemindStore as a Set of Partial Functions; Using Lifting for Conversations between Total and Partial Functions; Summary; Scala Collections; Working with Lists; Constructing Lists; Operations on Lists; Pattern Matching on Lists; First-Order Methods on List
Appending and ConcatenationTaking the Length of a List; Reversing a List; Prefixes and Suffixes; Element Selection; Display; Activity: Creating a New Mode for Chatbot Using Lists; Abstracting on Sequences; The Traversable Trait; Iterators; Streams; Activity: Implementing Fibonacci Series Using Streams and Iterators; Other Collections; Sets; Tuples; Maps; Mutable and Immutable Collections; Activity: Implementing the Tower of Hanoi Problem; Summary; Scala Type System; Type Basics and Polymorphism; A Unified Type System; Parametric Polymorphism; Type Inference; Parameterized Types; Bounds
Existential TypesActivity: Generalizing the Implementation of the Binary Tree; Variance; Covariance; Contravariance; Invariance; Activity: Implementing Covariance and the Database for Tools; Advanced Types; Abstract Type Members; Structural Types; Option; Higher Kind Types; Type Erasure; Activity: Finding an Element Based on a Given Predicate; Summary; Implicits; Implicit Parameters and Implicit Conversions; Implicit Parameters; Implicit Conversions; Implicit Resolution; Activity: Creation of Extension Methods; Ad Hoc Polymorphism and Type Classes; Types of Polymorphism; Type Classes
Summary This book teaches you how to build and contribute to Scala programs, recognizing common patterns and techniques used with the language. You'll learn how to write concise, functional code with Scala. After an introduction to core concepts, syntax, and writing example applications with scalac, you'll learn about the Scala Collections API and how ..
Notes Context Bounds and Implicitly
Print version record
Subject Epitonium.
Internet: general works.
Programming & scripting languages: general.
Computers -- Programming Languages -- Java.
Computers -- Web -- General.
Computers -- Programming Languages -- General.
Form Electronic book
Author Shevchenko, Ruslan
ISBN 9781789534702