the x::y::xs -> case does not recur in the else branch, so an input of [1,2,2,2,3,3,3] will simply return [1] when the first two elements of the input do not match - leaving the [2,2,2,3,3,3] portion completely unprocessed.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Interesting this code
when applied to
returns
the
x::y::xs ->
case does not recur in theelse
branch, so an input of[1,2,2,2,3,3,3]
will simply return[1]
when the first two elements of the input do not match - leaving the[2,2,2,3,3,3]
portion completely unprocessed.