PassiveSupport.Range.includes-question-mark
You're seeing just the function
includes-question-mark
, go back to PassiveSupport.Range module for more information.
Specs
Returns true
if other
is a number that falls within range
, or
if other_range
is fully contained within range
, regardless of
polarity. Returns false
for all other values of other
.
Examples
iex> includes?(1..5, 3)
true
iex> includes?(1..5, 5)
true
iex> includes?(1..5, :math.pi)
true
iex> includes?(1..5, :no)
false
iex> includes?(1..5, nil)
false
iex> includes?(1..5, 2..4)
true
iex> includes?(1..5, 4..6)
false
iex> includes?(1..5, 0..2)
false
iex> includes?(5..1, 3)
true
iex> includes?(5..1, 2..4)
true
iex> includes?(5..1, 4..2)
true