operations ▸ A representation of either value or behaviour ▸ Some types can be represented with classes, some need language support ▸ They can be checked at compile time, so sometimes they’re called proofs ▸ Remember this
Create an instance using operator :: ▸ Define them using lambda nomenclature ▸ A function as last parameter to another function gets syntactic sugar ▸ Great for DSLs
compatible ▸ Two flavours: mutable and immutable ▸ Operations with function parameters: map, filter, reduce… https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/
immutable, var for mutable ▸ Nullable types and Default values ▸ Named parameters ▸ data qualifier: all of the above plus equals(), hashCode() and toString()
▸ ordinal position ▸ Implement Enum<T> interface if you’re a generic abstractions kind of person ▸ Look into Kotlin’s reified generics when you get home
and methods requires dereferencing using when() and is -> ▸ The compiler checks that all cases are handled! ▸ Data classes and implement interfaces (1.1) ▸ Type alias (1.1)