[Haskell-cafe] Problems interpreting

Ketil Malde ketil+haskell at ii.uib.no
Mon Sep 18 06:58:50 EDT 2006


Carajillu <crespi.albert at gmail.com> writes:

> I get "line 18:parse error (possibly incorrect indentation)"

..which is a bit misleading, as the problem is on the preceeding line
of code.

> 		if x == e then return l2

And if x /= e?  What is check_elem then?¹  

> -- Tries to match two lists. If they match, the result consists of the
> sublist
> -- bound to the wildcard in the pattern list.
> (line 18) 

-k

¹ If you really don't want to provide that option, you could perhaps do:
        check_elem x | x == e = return l2



More information about the Haskell-Cafe mailing list