Carajillu <[EMAIL PROTECTED]> writes: > That works good, but I have a problem with the return type, I forgot to > mention... can it be a [char]??
If that's what you want, how about this: import Maybe find_match l1 l2 c = fmap catMaybes . sequence $ zipWith match l1 l2 where match a b | a == c = Just (Just b) | a == b = Just Nothing | otherwise = Nothing although part of the reason for writing it like that is to make you work hard to understand it ;-) ... and it returns Maybe [Char] since I can't bring myself to use "" to indicate failure... but judicious use of catMaybes . concat. maybeToList might help with that. -- Jón Fairbairn [EMAIL PROTECTED] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe