by taolson · 1mo ago · 0 comments
fmap f Nothing = Nothing
fmap f (Just x) = Just (f x)
pure x = Just x
Nothing >>= f = Nothing
Just x >>= f = f xYou don't need List<A> to write an IntList, nor do you need + to work on different integers in order to have a particular integer.
Otherwise memorize a little bit and dispose of the mystery. It’s not that far out.