streamly icon indicating copy to clipboard operation
streamly copied to clipboard

Use Fold and Unfold only in new stream modules

Open harendra-kumar opened this issue 3 years ago • 0 comments

The newer monomorphic serial stream module in 0.9.0 should abandon the folds and generation functions in Prelude and try to use only Fold and Unfold for these purposes. All the conventional fold/generation functions should be expressible in terms of folds/unfolds.

harendra-kumar avatar Mar 01 '22 08:03 harendra-kumar

Streams and Folds are dual to each other. We decided to remove folds from the Stream module and exclusively use the Fold type for stream consumers. However, for generation we would use Stream rather than Unfolds. Unfolds are mainly for nesting use cases where we need good performance.

harendra-kumar avatar Aug 12 '22 08:08 harendra-kumar