I saw something like "F[_]: Applicative" in the code.
Do we use this anywhere else already?
Short answer: Yes, in many places
Longer answer: ...this talk
"Functional Programming is writing programs with (pure) functions and (immutable) data"
~ Me ;)
Focus of this talk
If a function...
=> The ideal is to make all functions total and pure
Partiality (Option)
Errors (Either)
Nondeterminism (List)
A => Option[B]
A => Either[?, B]
A => List[B]
A => Future[B]
Functor
Applicative
Monad
map
ap
pure
flatMap
(flatten)
(product, zip, mapN)
"Transform values inside an effect"
"Compose effects independently"
"Compose effects dependently"
"Functional Programming with Effects" ~ Rob Norris
"Applicative: The Origin Story" ~ Justin Heyes-Jones
By Felix Bruckmeier
FP with effects in Scala (using cats)