reazen / relude

FP-inspired prelude/standard library for ReasonML projects
https://reazen.github.io/relude
MIT License
267 stars 41 forks source link

Add partial-clamping to Ord #337

Closed mlms13 closed 1 year ago

mlms13 commented 1 year ago

Currently we have a clamp function for everything that implements Ord that clamps both lower and upper bounds. It would be helpful to have an easy way to do something like myNumber |> Float.clampLower(0.0). Maybe clamp isn't the right name for this?

mlms13 commented 1 year ago

Wait. clampLower is just max, right?