[Haskell-cafe] Problems interpreting
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
> 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
> -- bound to the wildcard in the pattern list.
> (line 18)
¹ 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