Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add strict foldlWithKeyM #795

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

Draft
andrewthad wants to merge 1 commit into haskell:master
base: master
Choose a base branch
Loading
from andrewthad:monadic-folds

Conversation

Copy link

@andrewthad andrewthad commented Aug 16, 2021

Resolves #793

This is just the implementation of a single monadic fold. @treeowl if you confirm that this implementation of this particular function looks good, I can add all of the lazy folds and the right folds as well

Copy link
Author

@treeowl Do you have any feedback on this?

Copy link
Contributor

treeowl commented Aug 25, 2021 via email

I don't think monadic folds should be strict.
...
On Mon, Aug 16, 2021, 11:06 AM Andrew Martin ***@***.***> wrote: Resolves #793 <#793> This is just the implementation of a single monadic fold. @treeowl <https://github.com/treeowl> if you confirm that this implementation of this particular function looks good, I can add all of the lazy folds and the right folds as well ------------------------------ You can view, comment on, or merge this pull request online at: #795 Commit Summary - Add strict foldlWithKeyM File Changes - *M* containers/src/Data/Map/Internal.hs <https://github.com/haskell/containers/pull/795/files#diff-103080e0d137ba6f6394548ec82df803a30300d7052eba9490258b50e5b493e7> (14) Patch Links: - https://github.com/haskell/containers/pull/795.patch - https://github.com/haskell/containers/pull/795.diff — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#795>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAOOF7NWPXNYAOCGPOGPC5DT5ESOLANCNFSM5CH5OETQ> . Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email> .

Copy link
Author

I've changed this in the most recent commit. I think I'll have:

  • left monadic fold on map
  • right monadic fold on map
  • left monadic fold on intmap
  • right monadic fold on intmap

Anything else you'd like to see in that list.

Copy link
Contributor

treeowl commented Aug 25, 2021 via email

Yeah, could you get me some pizza? I've been missing the really good stuff.
...
On Wed, Aug 25, 2021, 12:27 PM Andrew Martin ***@***.***> wrote: I've changed this in the most recent commit. I think I'll have: - left monadic fold on map - right monadic fold on map - left monadic fold on intmap - right monadic fold on intmap Anything else you'd like to see in that list. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#795 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAOOF7NXUFRWXYXLSDOGJFLT6UKYZANCNFSM5CH5OETQ> . Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email> .

Copy link
Author

I live in Atlanta, so all the truly good pizza is a ways up the east coast from me.

Copy link
Contributor

treeowl commented Aug 25, 2021 via email

Oh darn. Guess I'll have to make you pizza if you come visit (D.C. area).
...
On Wed, Aug 25, 2021, 12:33 PM Andrew Martin ***@***.***> wrote: I live in Atlanta, so all the truly good pizza is a ways up the east coast from me. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#795 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAOOF7IDZIB4557ALSMBIOLT6ULPFANCNFSM5CH5OETQ> . Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email> .
andrewthad reacted with thumbs up emoji

Copy link

ocramz commented Jan 3, 2023

@treeowl This seems like an uncontroversial (and welcome) addition, how can we move this PR forward?

Copy link
Author

Is there anything I can do to move this forward?

Copy link
Contributor

treeowl commented Aug 16, 2023

I got sick a few weeks ago, and then went on family vacation. I expect to be ready to get back to my GitHub backlog by next Thursday. If this is ready for review, could you mark it as such?

Copy link
Author

I've squashed and rebased. This adds foldlWithKeyM and foldrWithKeyM functions for the Data.Map data structure, both of which are lazy in the accumulator. It's ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@treeowl treeowl treeowl left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Add foldlWithKeyM

AltStyle によって変換されたページ (->オリジナル) /