[Haskell-beginners] maybe in IO

vold voldermort at hotmail.com
Thu Aug 1 17:00:59 CEST 2013


I've defined a function similar to

check x assoc = let found = lookup x assoc in
                    when (isJust found) $ putStrLn $ "found " ++ fromJust found

which I've used several times from within the IO monad. Is there a more
compact way of doing this?





More information about the Beginners mailing list