Rivet.Utils.Ranges (rivet_utils v2.7.0)

Copy Markdown View Source

Summary

Functions

iex> collapse([]) "" iex> collapse([2, 3, 4, 5, 70, 71, 72, 80], ";") "2-5;70-72;80"

iex> expand(["70-72, 3,2-5, 80"]) [2, 3, 4, 5, 70, 71, 72, 80]

Functions

collapse(numbers, delim \\ ", ")

iex> collapse([]) "" iex> collapse([2, 3, 4, 5, 70, 71, 72, 80], ";") "2-5;70-72;80"

expand(list)

iex> expand(["70-72, 3,2-5, 80"]) [2, 3, 4, 5, 70, 71, 72, 80]

in_order(list)