a programming paradigm. A style of building the structure and elements of computer programs that treats computa0on as the evalua0on of mathema0cal func0ons and avoids changing-state and mutable data. -- Wikipedia @raulraja @47deg 3
argument or returns a func*on as return type: def transform[B](list : List[Int])(transformation : Int => B) = list map transformation transform(List(1, 2, 4))(x => x * 10) @raulraja @47deg 5
a type to combine itself with other values of the same type in addi7on it provides an empty value. import simulacrum._ @typeclass trait Monoid[A] { def combine(x : A, y : A) : A def empty : A } @raulraja @47deg 14
| And now here is my secret, a very simple secret: | It is only with the heart that one can see rightly; | what is essential is invisible to the eye. | ― Antoine de Saint-Exupéry, The Little Prince """.stripMargin Presentation[Try].onUserRequestedTags(text) @raulraja @47deg 41
Controlled Effects at the edge • Separa-on of concerns on steroids • A unified model to create components and compose them • A unified API to rule all data types when using just type classes. • Restricted to thoroughly tested lawful declara-ons with a base on mathema-cs @raulraja @47deg 42