
4 Feb
2007
4 Feb
'07
9:24 a.m.
I have a Data.Map.Map String -> (Layout, [String]) as follows: type Anagrams = [String] type Cell = (Layout, Anagrams) type WordMap = Map.Map String Cell exists str wmap = let a = Map.lookup (sort str) wmap in case a of Nothing -> False Just x -> case (find (== str) (snd x)) of Nothing -> False _ -> True the existence test looks ugly - any more compact way to write it? martin