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

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to