RangeP
RangeP[min,max]⟹pattern
generates a pattern that will match a value between the provided min and max.
RangeP[min,max,increment]⟹pattern
generates a pattern that will match a value greater than min by a multiple of increment and also less than max.
RangeP[increment]⟹pattern
generates a pattern that will match any value that is a multiple of increment.
Examples
Basic Examples (5)
Additional Examples (15)
Specify an increment in numeric case:
Specify an increment in DateObject case:
Specify an increment in DateObject case:
Pattern does not match if given quantity is outside specified range:
Can handle different Units, provided they are compatibile:
Pattern does not match if Units are incompatible:
Pattern does not match if Units are incompatible:
Numeric values and quantities are incompatible:
Does not evaluate if range ends are incompatible:
Numeric values and quantities are incompatible:
Infinite bounds match any compatible value:
Infinite bounds don't match incompatible units:
Function does not evaluate on other inputs:


