Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add Data.Conduit.List.iterM #68

Merged
merged 2 commits into from Jan 1, 2013

Conversation

Projects
None yet
3 participants
Contributor

NicolasT commented Aug 28, 2012

This Conduit simplifies performing a monadic action for every value
generated by a Source, and passing the value on as-is.

Not sure there'd be any interest in this, it turned out to be useful in some of my playground code.

I choose iterM as name based on something similar found in the OCaml standard library (for lists):

val iter : ('a -> unit) -> 'a list -> unit
Add Data.Conduit.List.iterM
This Conduit simplifies performing a monadic action for every value
generated by a Source, and passing the value on as-is.
Collaborator

meteficha commented Aug 29, 2012

The code looks good to me, but could you write some unit tests for the new function? Or perhaps a QuickCheck property stating that iterM works like the mapM you mention in the docs? =)

Owner

snoyberg commented Oct 4, 2012

Sorry for the delayed response, I only just saw the added test. We actually have a test suite in place already, would it be possible to add the tests to that suite instead of putting them in a separate executable?

@snoyberg snoyberg merged commit addd6cb into snoyberg:master Jan 1, 2013

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