[Haskell-cafe] Fold that quits early?

wren ng thornton wren at freegeek.org
Sat Jan 24 22:26:52 EST 2009

On Saturday 24 January 2009 11:39:13 am Andrew Wagner wrote:
> 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 it fits.

Were thinking of Elgot algebras 
<http://comonad.com/reader/2008/elgot-coalgebras/> ? That's a 
hylomorphism that cheats, rather than a catamorphism (aka "fold"), but 
it sounds like what you want.

Live well,

More information about the Haskell-Cafe mailing list