[Haskell-cafe] Problems interpreting
Carajillu
crespi.albert at gmail.com
Mon Sep 18 08:35:47 EDT 2006
Finally I took Andrea's solution "check_elem (x:xs) = if x == e then (l2 ++
xs) else [x] ++ check_elem xs"
I think it's easy to understand for me ( in my noob level), than the
recursive one.
I'm testing it and it's working really well. The other solutions are a
little complicated for me, but I'm still trying to undestand them.
Thanks!
Andrea Rossato wrote:
>
> On Mon, Sep 18, 2006 at 12:25:21PM +0100, Neil Mitchell wrote:
>> Why not:
>> > check_elem (x:xs) = if x == e then (l2 ++ xs) else x : check_elem xs
>>
>> Thanks
>
> Thank you!
> Lists are my personal nightmare...;-)
>
> Andrea
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
--
View this message in context: http://www.nabble.com/Problems-interpreting-tf2290155.html#a6362822
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe
mailing list