
22 Jul
2008
22 Jul
'08
6:39 p.m.
2008/7/22 J.N. Oliveira
But you still need the extra parentheses...
Not so! infixl 0 .| infixl 0 .|... -- 'otherwise' construct infix 1 .= (.=) :: (a -> Bool) -> (a -> b) -> (a -> Maybe b) (.|) :: (a -> Maybe b) -> (a -> Maybe b) -> (a -> Maybe b) (.|...) :: (a -> Maybe b) -> (a -> b) -> (a -> b) -- implementations left as exercise for the reader outStanza = isMessage .= outMessage .| isPresence .= outPresence .| isIQ .= outIQ .|... const 42 Hooray for abusing operators! Luke