Returns a signed value indicating how many nested invocations of
#next (if positive) or #previous (if negative) are needed to reach
end starting from start.
Returns a signed value indicating how many nested invocations of
#next (if positive) or #previous (if negative) are needed to reach
end starting from start. For example, if end =
next(next(next(start))), then distance(start, end) == 3 and
distance(end, start) == -3. As well, distance(a, a) is always
zero.
Note that this function is necessarily well-defined for any discrete type.
the distance as described above, or Long#MIN_VALUE or
Long#MAX_VALUE if the distance is too small or too large,
respectively.
Returns a Some with the maximum value of type C, if it has one.
Returns a Some with the maximum value of type C, if it has one. The maximum
value is the unique value for which Ordering#compare(this,that)
never returns a negative value for any input of type C.
The default implementation returns None.
a Some with the maximum value of type C or None if there is none
Returns a Some with the minimum value of type C, if it has one.
Returns a Some with the minimum value of type C, if it has one. The minimum
value is the unique value for which Ordering#compare(this,that)
never returns a positive value for any input of type C.
The default implementation returns None.
a Some with the minimum value of type C or None if there is none
Returns a Some wiht the unique least value of type C that is greater than
value, or None if none exists.
Returns a Some wiht the unique least value of type C that is greater than
value, or None if none exists. Inverse operation to
#previous.
any value of type C
Some with the least value greater than value, or None if
value is maxValue()
Returns a Some with the unique greatest value of type C that is less than
value, or None if none exists.
Returns a Some with the unique greatest value of type C that is less than
value, or None if none exists. Inverse operation to
#next.
any value of type C
Some with the greatest value less than value, or None if
value is minValue()
Returns the discrete domain for values of type
Int.