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

Support serial composability in Validated #604

Closed
metasim opened this issue Nov 6, 2015 · 1 comment
Closed

Support serial composability in Validated #604

metasim opened this issue Nov 6, 2015 · 1 comment
Assignees

Comments

@metasim
Copy link

metasim commented Nov 6, 2015

Per gitter comment, consider some mechanism for composing multiple, serialized Validated transformations without having to go back and forth between Xor to get flatMap.

@ceedubs
Copy link
Contributor

ceedubs commented Nov 7, 2015

To add a little more detail after a follow-up Gitter conversation. It sounds like the consensus is to add a new method to Validated that has the same signature as flatMap but with a different name, since it will not actually be a monadic bind (since it won't be consistent with ap).

As is often the case, naming is the hardest part. @metasim suggested andThen, which is perhaps a bit overloaded, but I've thought for a while and can't come up with a better name, so I'd be happy with that.

ceedubs added a commit to ceedubs/cats that referenced this issue Nov 7, 2015
Fixes typelevel#604.

This is essentially `flatMap` for `Validated`, but since `flatMap`
suggests monadic bind in Cats and this is not consistent with `ap`,
another name is being used.
@ceedubs ceedubs self-assigned this Nov 7, 2015
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

3 participants