between
between :: Number → Number → a → Boolean
Last updated
between :: Number → Number → a → Boolean
Last updated
Takes a two numbers, min and max, and return a new function evaluating whether the received value is of included between min and max. (the one previously defined). The evaluation is not inclusive.
The between validator is a curried function
Please note, between returned functions does not evaluate if the received values are of type integer or float. A good improvement for the isTeen validator from the example above could be the following: