| Next | Types Are Theorems; Programs Are Proofs | 25 |
How do you use a value of type Either a b?
It's a little complicated
In Haskell it looks like this:
-- z :: Either a b
case z of
Left x ->
… x … -- a -> c
Right y ->
… y … -- b -> c
:: c
continued...
| Next | Next |