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

derive ‘append’ and ‘prepend’ from ‘concat’ and ‘of’ #62

Merged
merged 1 commit into from
Jun 20, 2017

Conversation

davidchambers
Copy link
Member

append and prepend are defined in Sanctuary, but based on sanctuary-js/sanctuary#414 (comment) we'd like to move the definitions here. :)

@@ -27,10 +35,16 @@ Maybe[FL.of] = Maybe.Just;

Maybe[FL.zero] = Maybe[FL.empty];

Maybe.prototype[FL.equals] = function(other) {
function Maybe$prototype$equals(other) {
Copy link
Member

Choose a reason for hiding this comment

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

Why this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

For consistency with changes made in sanctuary-js/sanctuary#388 which were made for the same reason as sanctuary-js/sanctuary#359. Essentially, Maybe a satisfies the requirements of Setoid if a satisfies the requirements of Setoid.

Copy link
Member

@gabejohnson gabejohnson left a comment

Choose a reason for hiding this comment

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

LGTM

@davidchambers davidchambers merged commit d757289 into master Jun 20, 2017
@davidchambers davidchambers deleted the davidchambers/append-prepend branch June 20, 2017 21:34
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