Skip to content
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

zipWithM #204

Open
robrix opened this issue Nov 24, 2024 · 1 comment
Open

zipWithM #204

robrix opened this issue Nov 24, 2024 · 1 comment

Comments

@robrix
Copy link

robrix commented Nov 24, 2024

Control.Monad exports zipWithM, defined as:

zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [a] -> m [a]
zipWithM f as bs = sequenceA $ zipWith f as bs

No reason semialign couldn't generalize this to work with Zip, too. I'd be happy to submit a PR if that would be welcome.

Thanks all for a lovely suite of packages 💟

@phadej
Copy link
Collaborator

phadej commented Nov 24, 2024

My first thought is that it would be better to provide type-classes for those (like Witherable <-> Filterable), to avoid the intermediate structure.
Second thought that we shouldn't forget about alignWith either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants