Neil Mitchell wrote:
close (x:y:xs) | abs (x - y) < 0.1 = y
close (x:xs) = close xs

I don't know how to add it into the one liner though - although I
suspect someone here will :)
 head . head . filter (\(x:y:_) -> abs (x-y) < 0.1)

?

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

Reply via email to