[Haskell-cafe] Fold that quits early?
wagner.andrew at gmail.com
Sat Jan 24 11:39:13 EST 2009
This is almost a fold, but seemingly not quite? I know I've seem some talk
of folds that potentially "quit" early. but not sure where I saw that, or if
f xs  = False
f xs (y:ys) | any c ys' = True
| otherwise = f (nub (y:xs)) (ys' ++ ys)
where ys' = g y xs
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe