Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Functors

 Functors

Sebastian Bruckner

June 21, 2017
Tweet

Other Decks in Programming

Transcript

  1. Addition: empty: 0 combine: a + b Multiplication: empty: 1

    combine: a * b List: empty: Nil combine: a ++ b
  2. associativity: (x |+| y) |+| z = x |+| (y

    |+| z) left identity: Monoid[A].empty |+| x = x right identity: x |+| Monoid[A].empty = x