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

number, string: add S.min and S.max #146

Merged
merged 1 commit into from
Feb 8, 2016
Merged

number, string: add S.min and S.max #146

merged 1 commit into from
Feb 8, 2016

Conversation

davidchambers
Copy link
Member

min :: Ord a => a -> a -> a
max :: Ord a => a -> a -> a

R.min and R.max, but with type checking. I want to tick some boxes in #145. :)

type === 'String';
}
);

Copy link
Member Author

Choose a reason for hiding this comment

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

We should document all the type classes at some point.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. This will also be a very useful type.

@davidchambers
Copy link
Member Author

Prompted by your comment, @svozza, I added several more assertions. I also updated the examples to highlight the difference between number comparison and string comparison, and added a paragraph to each function's description to explain the distinction.

@svozza
Copy link
Member

svozza commented Feb 8, 2016

LGTM.

davidchambers added a commit that referenced this pull request Feb 8, 2016
number, string: add S.min and S.max
@davidchambers davidchambers merged commit 482cbf7 into master Feb 8, 2016
@davidchambers davidchambers deleted the dc-min-max branch February 8, 2016 22:19
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