PassiveSupport.Range.join
You're seeing just the function
join
, go back to PassiveSupport.Range module for more information.
Specs
If the provided ranges overlap or are adjacent, returns a new range spanning the entirety of both
Examples
iex> join(1..5, 6..10)
1..10
iex> join(1..5, 4..8)
1..8
iex> join(10..20, 5..15)
5..20
iex> join(1..10, 2..8)
1..10
iex> join(1..2, 5..10)
** (ArgumentError) Cannot join 1..2 and 5..10
iex> join(1..5, 10..5)
** (ArgumentError) Cannot join 1..5 and 10..5//-1