Skip to content

replaceT instead of streamEditT #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2022
Merged

replaceT instead of streamEditT #194

merged 1 commit into from
Apr 27, 2022

Conversation

jamesdbrock
Copy link
Member

@jamesdbrock jamesdbrock commented Apr 27, 2022

replaceT is a better API and also more elemental than streamEditT, because streamEditT can be written in terms of
replaceT.

streamEditT input sep editor = replaceT input (sep >>= editor >>> lift)

Checklist:

  • Added the change to the changelog's "Unreleased" section with a link to this PR and your username
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation in the README and/or documentation directory
  • Added a test for the contribution (if applicable)

@jamesdbrock jamesdbrock force-pushed the replace2 branch 3 times, most recently from 1ae9cbf to fcd3bc9 Compare April 27, 2022 16:49
streamEditT can be written in terms of replaceT.

streamEditT input sep editor = replaceT input (sep >>= editor >>> lift)

But replaceT cannot be written in terms of streamEditT.
@jamesdbrock jamesdbrock merged commit 8e177f2 into main Apr 27, 2022
@jamesdbrock jamesdbrock deleted the replace2 branch April 27, 2022 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant