
25 Jun
2011
25 Jun
'11
4:29 p.m.
Arlen Cuss
import Data.Either type (:|:) a b = Either a b (???) = either
foo :: (Int :|: Bool :|: String :|: Double) -> Int foo = \ i -> i + 7 ??? \ b -> if b then 1 else 0 ??? \ s -> length s ??? \ d -> floor d
INFIX TYPE OPERATORS!!??!
O_________________________________________O
Yep. http://www.haskell.org/ghc/docs/7.0.3/html/users_guide/data-type-extensions.... -- lelf