-
Notifications
You must be signed in to change notification settings - Fork 55
Change foldM type signature to more closely match foldl #111
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
Conversation
There are a few more |
I think this is a good idea. It's a bit of an annoying breaking change since this library is so near the base of the dependency hierarchy, but it seems like the way it should have been done. Maybe we should rename it to |
As far as I can tell this isn't a breaking change - it's alpha-equivalent, right? And there's no way of inspecting type variable names except in error messages? I'm not hugely keen on |
Hah, that'll teach me to pay attention. I thought it was reordering the argument for the fold step function. Given it's not breaking, yeah, I'd leave it as I think |
I believe I found all the related Tried to stay consistent with variable names within the functions, although there are some subtle variations. For example |
If anything, I'd say it's |
That might make the differences between Existing: foldr :: (a -> b -> b) -> b -> f a -> b
foldl :: (b -> a -> b) -> b -> f a -> b If foldr :: (a -> b -> b) -> b -> f a -> b
foldl :: (a -> b -> a) -> a -> f b -> a |
I recently misread the Searching for
Ideally, we'd have a process to let these breaking changes be as painless as possible. |
Since we're making breaking changes now, I'm assuming this should be merged, correct? However, should a |
This isn't a breaking change, but I think we should merge it now, regardless of whether we want to add a separate |
This is a cosmetic change to follow the naming convention of other fold operations, and make the relationship to
foldl
more obvious.Previously:
With change:
This also more closely matches haskell: