[Haskell-cafe] Problems interpreting

Andrea Rossato mailing_list at istitutocolli.org
Mon Sep 18 08:57:09 EDT 2006


On Mon, Sep 18, 2006 at 02:52:45PM +0200, Andrea Rossato wrote:
> On Mon, Sep 18, 2006 at 05:42:47AM -0700, Carajillu wrote:
> > 
> > Not a good solution, it just substitutes the first occurrence of the item in
> > the list. I'll try the others
> 
> I did not get this point.
> You must take Jón's approach with map.

or use this line in mine: 
check_elem (x:xs) = if x == e then l2 ++ check_elem xs else x : check_elem xs 

that is to say, you must check also the tail after the matched element.
andrea



More information about the Haskell-Cafe mailing list