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

Validation is not a monad #1

Closed
puffnfresh opened this Issue Dec 14, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@puffnfresh

puffnfresh commented Dec 14, 2013

If validation were a monad, the following two expressions would be equal:

x.map(function(a) {
  return function(b) {
    return [a, b];
  };
}).ap(y);

x.chain(function(a) {
  return y.map(function(b) {
    return [a, b];
  });
});

It's not possible to make those be equal in the case that both x and y are failures.

The project should also be renamed to something like applicative.validation to avoid further confusion.

@puffnfresh

This comment has been minimized.

Show comment
Hide comment
@puffnfresh

puffnfresh Dec 15, 2013

Woo! Thanks 👍

puffnfresh commented Dec 15, 2013

Woo! Thanks 👍

@robotlolita robotlolita referenced this issue Jun 2, 2016

Closed

No chain? #15

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