Proposal (Retracting)

James Ashwell james.michael.ashwell at gmail.com
Wed Apr 10 19:40:13 UTC 2019


My apologies, I've found a better way to express it and am retracting this proposal: 

mwhen cond a = 
  fold [a | cond]

a <> mwhen p b <> c <> mwhen q d
  = (fold.fold) [[a],[b|p],[c],[d|q]]

This also works with other folds without touching monoid newtype wrappers. I had hang-ups about bool as I don't feel like you can 'read off' the ordering, and thought mempty might be a common argument , but neither of those apply here.

Thank you for your replies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20190410/1f41161f/attachment.html>


More information about the Libraries mailing list