Let us suppose that we have a list xs (possibly a very big one), and we want to check that all its elements are the same.
xs
I came up wi
Here is another version (don't need to traverse whole list in case something doesn't match):
allTheSame [] = True allTheSame (x:xs) = isNothing $ find (x /= ) xs
This may not be syntactically correct , but I hope you got the idea.