Learning Haskell: How to remove an item from a List in Haskell
The others are right that the problem is the : operator. I would say that your areTheySame function that returns a list is the wrong approach anyway, though. Rather than switch to the ++ operator, a better implementation of that function would be: As you can see, this is a pretty simple implementation. Also, consing … Read more