The 4 Rules of Simple Design In Functional Programming
Ubert Barbini
Functional Programming Design usig Morphisms(圏論)
Category Theory and Functional Programming
Code Quality
avoiding spagetti
4 rules
pass the tests
reveals intention
no duplication
fewest elements
The tools of the trade
HOF
Immutable
it's all about morphisms
Category convertion
object
arrow
able to combine
Birthday Greeting Kata
Immutable Types
Pure Functions
Laziness
No Exception
Define Arrows with Pure Functions
what is not pure? -> Today()
Define Types for Each Objects
Functor
converting types with compsable way
constructer for List is an example
List<Employee> -> List<String>
Monoid: category with only one object
Monad: EndoFuncotrs
Wrapping Outcome and deal with Errors