[Haskell-beginners] Re: \x -> x < 0.5 && x > -0.5

Roel van Dijk vandijk.roel at gmail.com
Mon Oct 19 07:38:15 EDT 2009


Or simply write a function:

between :: Ord a => a -> a -> a -> Bool
between min max x = x > min && x < max

filter (between (-0.5) 0.5) xs

Keep it simple, stupid?


More information about the Beginners mailing list