18 overlap :: ([a], [a], [a]) -> ([a], [a], [a]) 19 overlap (as, bs, cs) = 20 if bs == take (length bs) cs then (as, bs, (drop (length bs) cs)) 21 else if (length bs) > 1 then overlap (as:[head bs]) (tail bs) cs 22 else ([], [], []) m.hs:21:43: Couldn't match expected type `[a]' against inferred type `a' (a rigid variable) `a' is bound by the type signature for `overlap' at m.hs:18:13 Expected type: [a] Inferred type: a In the expression: head bs In the second argument of `(:)', namely `[head bs]' Failed, modules loaded: none.