Skip to content

Make the inject function of Unfold pure#3223

Open
harendra-kumar wants to merge 17 commits into
masterfrom
streaming-updates
Open

Make the inject function of Unfold pure#3223
harendra-kumar wants to merge 17 commits into
masterfrom
streaming-updates

Conversation

@harendra-kumar
Copy link
Copy Markdown
Member

Also, rename some constructors, modules, types in Scans.

Change Unfold's inject from (a -> m s) to (a -> s).

Improves fusion, Stream.unfold no longer needs a PreInit state,
eliminating one state constructor and one Skip on the first pull for
unfolds with a pure inject.

Also fixes a latent bug in Unfold.before where `action >> inject`
resolved through the Reader (((->) a)) monad's >> and silently
dropped the action.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant