[Haskell-beginners] \x -> x < 0.5 && x > -0.5
pl
pl.listas at gmail.com
Fri Oct 23 10:25:57 EDT 2009
filter ((<=0.5) . abs) xs
On Mon, Oct 19, 2009 at 10:49 AM, Michael Mossey <mpm at alumni.caltech.edu>wrote:
> Is there a nifty way to write
>
> filter (\x -> x < 0.5 && x > -0.5) xs
>
> without explicitly using x?
>
> Maybe arrows? I have a vague understanding that arrows can "send" an
> argument to more than one computation.
>
> -Mike
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20091023/28567100/attachment.html
More information about the Beginners
mailing list