- Monads are Trees with Grafting
- Understanding F-Algebras
- The Interpreter Pattern Revisited
- Difference between free monads and fixpoints of functors?
- What is the “Free Monad + Interpreter” pattern?
- What are free monads?
- ScalaZ - Getting to grips with the Free Monad
- A Modern Architecture for FP
- Freer Monad, More Extensible Effects
- Dead-Simple Dependency Injection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On why stateful code is bad | |
=========================== | |
STUDENT: Sir, can I ask a question? | |
TEACHER: Yes! | |
STUDENT: How do you put an elephant inside a fridge? | |
TEACHER: I don't know. | |
STUDENT: It's easy, you just open the fridge and put it in. I have another question! | |
TEACHER: Ok, ask. | |
STUDENT: How to put a donkey inside the fridge? |
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Concept for emulating higher-kinded types using Flow. Instead of passing | |
* a type that has not been applied to parameters, this pattern passes | |
* a type-level function that will map a parameter type to the desired | |
* higher-kinded type applied to the given parameter. | |
* | |
* @flow | |
*/ | |
// a higher-kinded type is represented indirectly via a type-level function from |