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

feat: add pos? and neg? to predicate-schemas #247

Merged

Conversation

rschmukler
Copy link
Contributor

Adds the core pos? and neg? functions to the predicate schemas. This
is useful for when you don't care about the type of numeric, (ie. int vs
double vs float) and only the sign of it.

Also useful for constructing [:and pos? float?] if you want positive floats.

Copy link
Member

@ikitommi ikitommi left a comment

Choose a reason for hiding this comment

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

For completeness, there should be json-schema mappings & generators for these too.

Adds the core `pos?` and `neg?` functions to the predicate schemas. This
is useful for when you don't care about the type of numeric, (ie. int vs
double vs float) and only the sign of it.

Also useful for constructing `[:and pos? float?]` if you want positive floats.
@rschmukler
Copy link
Contributor Author

@ikitommi Thanks for the review. Updated w/ generators and json-schema mappings.

@rschmukler rschmukler force-pushed the rschmukler/add-predicate-schemas branch from 54fa6f2 to 623a5d9 Compare August 30, 2020 18:44
@ikitommi ikitommi merged commit e35a8ad into metosin:master Aug 31, 2020
@ikitommi
Copy link
Member

Thanks!

@ikitommi
Copy link
Member

there was one more place: a6d38fa

@ikitommi
Copy link
Member

@rschmukler coudn't make you a reviewer on #212 , but would you have time to take a look at it? if the diff is too messy (it is), I could cherry pick the code formatting & moving around into separate issue.

@rschmukler
Copy link
Contributor Author

@ikitommi will take a look! Thanks for the help getting this merged.

@rschmukler rschmukler deleted the rschmukler/add-predicate-schemas branch August 31, 2020 21:14
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