Day 3: Maybe — Mini-Lists, or Mini-Exceptions
Maybe
is like []
but “smaller” — Maybe t
can store zero or one elements of type t
, but not more.
There’s a category theory way of relating Maybe
and []
: natural transformations convert between Functor
s while also making sure…