
Dear Haskell Cafe, In the following program f :: Int -> [(Int,Int)] -> [(Int,Int)] -> [(Int,Int)] f _ cs [] = cs f _ [] _ = [] f i (c:cs) ((i',t):os) | i < i' = [] | i == i' = [] | i > i' = [] -- | otherwise = [] main :: IO () main = do print $ f 0 [] [] without the "otherwise" clause (commented) I get the warning example.hs:2:1: Warning: Pattern match(es) are non-exhaustive In an equation for `f': Patterns not matched: _ (_ : _) ((_, _) : _) Could someone help me uncover which cases that are not… erm… covered by the above patterns? Many thanks, Semen PS This definition, on the other hand, f _ cs [] = cs f _ [] _ = [] f i (c:cs) ((i',t):os) = [] is exhaustive… -- Семен Тригубенко http://trygub.com