[Haskell-cafe] Application of iterate

Neil Mitchell ndmitchell at gmail.com
Fri Mar 23 07:38:54 EDT 2007


Hi

> > 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)

Doesn't work, I assume you meant (and typo'd):

head . head . filter (\(x:y:_) -> abs (x-y) < 0.1) . tails

Which does work fine.

Thanks

Neil


More information about the Haskell-Cafe mailing list