[Haskell-cafe] folds with escapes

oleg at pobox.com oleg at pobox.com
Thu Jul 5 02:20:43 EDT 2007

> Can you do dropWhile in terms of foldr?

One can write foldr that represents drop or dropWhile of the
original foldr. One can do even more: zip two folds. That is,
obtain a fold that is equivalent to zipping up two lists represented
by the original folds. Even furthermore, one can do all these things
without recursion (neither at the value level, nor at the type level).


More information about the Haskell-Cafe mailing list