
13 Jan
2010
13 Jan
'10
9:44 a.m.
Greetings! I looked at documentation of Maybe type and suprisingly found no function like maybize :: (a -> b) -> Maybe a -> Maybe b maybize f Nothing = Nothing maybize f (Just x) = Just (f x) I believe there should be a good reason for absence of such function, say: 1) there is an idiomatic way (probably utilizing higher level abstractions) of doing the same what 'maybize' does, 2) no one really needs it... except me, 3) ?.. Did I miss something? (It is rather about curiosity than a real problem though). Thanks in advance for any comments!