[Haskell-beginners] find an element in a list

Fabien R theedge456 at free.fr
Sat Dec 26 15:39:25 UTC 2015


On 26/12/15 15:46, Max Voit wrote:
> That is because you cannot pattern match whilst equality testing. The
> statement
>    xs == (x:ys)
> is problematic therefore. You expect the compiler to see "oh, I don't
> know ys, but xs is a list, so I'm just checking x and put the rest into
> ys while I'm at it".
Thanks Max,
It's more clear now.

--
Fabien


More information about the Beginners mailing list