❧
❧
Scala. Wat.
— Classes And Things
Classes And Things
In which we explore classes, traits and objects.
Next Page
❧
Classes
❦
Contents
Scala. Wat.
What Is Scala?
Code Along With Me
Values, Variables And Functions
Values and variables
Functions
Function Parameters
Function Parameters On Demand
If Statements
Expressions
Type Inference
Classes And Things
Classes
Traits
Case Classes
Using Case Classes
Objects
Object Inheritance
Companion Objects
Generics
Generic Constraints
Tuples
Collections
Lists
Sets
Vector
Maps
Option
The map Method
The flatMap Method
Why Flatmap?
Using flatMap With Option
Fold To The Left
Everything Is A Fold
For Loops
For Comprehensions
Nesting For Comprehensions
Filtering For Comprehensions
Making For Comprehensions
Collections Do Much More
Pattern Matching
Basic Pattern Matching
Pattern Matching On Types
Guards!
Pattern Matching Fields
Multiple Pattern Matches
Case.*
Partial Functions
Exceptions
Implementing Unapply
Typeclasses
What is a typeclass?
Is that really a typeclass?
But Scala isn’t Haskell.
What’s that doing?
How is that useful?
Stock Typeclasses: Functor
Stock Typeclasses: Applicative Functor
Stock Typeclasses: Monad
Stock Typeclasses: Monoid
Stock Typeclasses: Summary
Stock Typeclasses: Using Them
Other Things You May See
Nothing
Underscores
Currying And Partial Application
Either
Java Interop
Actors
What’s an actor?
What If I Want A Result?
Don’t Block!
Where Would I Use Actors?
SBT
Getting SBT Installed
SBT Basics
Contents in Depth
Combined Pages