Next | Types Are Theorems; Programs Are Proofs | 27 |
((a ∨ (a → b)) → b) → b
1 | Assume (a ∨ (a → b)) → b) | Assume we have f :: (Either a (a -> b)) -> b | |||||||||||||||||||||||||||||||||
2 | Assume a | Assume we have x :: a | |||||||||||||||||||||||||||||||||
3 | From (2), conclude a ∨ (a → b)
|
If nothing else this should convince you that Haskell types can be surprising
Next | Next |