Is there a way to pattern match any list without iterating through the two cases: empty or non-empty list ?
I would like to fix the following code:
foo [] = "something else"
foo [_:_] = "something else"
Since the part in something else
is the same I would like to remove it from one place.
Thank you.