Add strict foldlWithKeyM
Resolves https://github.com/haskell/containers/issues/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
@treeowl Do you have any feedback on this?
I don't think monadic folds should be strict.
On Mon, Aug 16, 2021, 11:06 AM Andrew Martin @.***> wrote:
Resolves #793 https://github.com/haskell/containers/issues/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:
https://github.com/haskell/containers/pull/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 https://github.com/haskell/containers/pull/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 .
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.
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 https://github.com/haskell/containers/pull/795#issuecomment-905688155, 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 .
I live in Atlanta, so all the truly good pizza is a ways up the east coast from me.
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 https://github.com/haskell/containers/pull/795#issuecomment-905692275, 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 .
@treeowl This seems like an uncontroversial (and welcome) addition, how can we move this PR forward?
Is there anything I can do to move this forward?
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?
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.