Range consolidation: Difference between revisions

Content added Content deleted
(Add source for Rust)
m (Improved comment for Rust code)
Line 1,532: Line 1,532:
Most of the implementation below belongs to the test and formatting support.
Most of the implementation below belongs to the test and formatting support.
If the output might be more arbitrary, the source would be quite small.
If the output might be more arbitrary, the source would be quite small.
The algorithm relies on normalizing the ranges and folding a sorted sequence of them.



<lang Rust>use std::fmt::{Display, Formatter};
<lang Rust>use std::fmt::{Display, Formatter};