
Carajillu
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 Jon.Fairbairn@cl.cam.ac.uk