Non-exhaustive patterns in function [duplicate]
It looks like you’re missing the case where there’s a one element list: countLongest’ n max (y:ys) | … etc. … | otherwise = …. Here’s a contrived example similar to yours: f [] = 3 — matches an empty list f (a:b:bs) = 4 — matches a list with at least two elements Examples: … Read more