
13 Apr
2011
13 Apr
'11
8:19 p.m.
On 14 April 2011 00:52,
Pattern matching works in ghci:
let x = Just (Left (Blah [stuff]))
let (Just (Left (Blah y)) = x
Thanks! That's exactly what I'm looking for.
FWIW there is also Data.Either which has the either function. λ> :t either either :: (a -> c) -> (b -> c) -> Either a b -> c Quite useful sometimes.