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

test: use curried Z functions more broadly #326

Merged
merged 1 commit into from
Feb 4, 2017
Merged

Conversation

davidchambers
Copy link
Member

Motivating example:

     ComposeFG.prototype[FL.ap] = function(other) {
-      return ComposeFG(Z.ap(Z.map(function(u) { return function(y) { return Z.ap(u, y); }; }, other.value), this.value));
+      return ComposeFG(ap(map(ap)(other.value))(this.value));
     };

@@ -15,21 +15,21 @@ module.exports = function(equals, A) {
identity: function(v) {
var lhs = ap(pure(id))(v);
var rhs = v;
return equals(lhs, rhs);
return equals(lhs)(rhs);
Copy link
Member

@safareli safareli Jan 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So with this changes API of "laws", from taking equals in uncurried form to curried form. rest of API is in uncurried form, which could be confusing (in case we move it to FL, but i think it's ok for now).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Let's cross that bridge when we get to it.

@davidchambers davidchambers merged commit c8eccaa into master Feb 4, 2017
@davidchambers davidchambers deleted the dc-test branch February 4, 2017 13:58
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

Successfully merging this pull request may close these issues.

2 participants