Module numeric

Source
Expand description

Utilities for numeric validations.

Functionsยง

between
Alias for in_range.
eq
Alias for equal_to.
equal_to
Returns a closure that takes an argument and checks if it is equal to the given value a.
ge
Alias for larger_than_or_equal_to.
gt
Alias for larger_than.
in_range
Returns a closure that takes an argument and checks if it is within the given range [a, b].
larger_than
Returns a closure that takes an argument and checks if it is less than the given value a.
larger_than_or_equal_to
Returns a closure that takes an argument and checks if it is greater than or equal to the given value a.
le
Alias for smaller_than_or_equal_to.
lt
Alias for smaller_than.
ne
Alias for not_equal_to.
not_equal_to
Returns a closure that takes an argument and checks if it is not equal to the given value a.
smaller_than
Returns a closure that takes an argument and checks if it is greater than the given value a.
smaller_than_or_equal_to
Returns a closure that takes an argument and checks if it is less than or equal to the given value a.