pub fn contiguous_list<T>(values: &[T]) -> boolExpand description
Whether each value is one more than the one before: music21’s
contiguousList, which wants them sorted first. An empty list is
contiguous here; music21 cannot look at its first value.
use music21::common::numbertools::contiguous_list;
assert!(contiguous_list(&[3, 4, 5, 6]));
assert!(!contiguous_list(&[3, 4, 5, 6, 8]));