5 Feb
2007
5 Feb
'07
2:13 a.m.
Maybe has a Monad instance, so you can write this as follows (untested):
exists str wmap = boolFromMaybe exists' where exists' = do x <- Map.lookup (sort str) wmap find (== str) (snd x) boolFromMaybe (Just _) = True boolFromMaybe Nothing = False
import isJust boolFromMaybe = isJust -- WBR, Max Vasin.