> 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. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
