
2 Feb
2010
2 Feb
'10
5:16 p.m.
Am Dienstag 02 Februar 2010 23:06:41 schrieb legajid:
-- Définition de la fonction de calcul f Nothing = -9999 f (Just x) = 2 * x
That's already in the standard libs: ghci> :t maybe maybe :: b -> (a -> b) -> Maybe a -> b ghci> maybe (-9999) (*2) (Just $ fromEnum 'k') 214