let
elements s =
let
f a (n1, n2) = burst_range n1 n2 a
in
List
.fold_left f [] (rev_ranges s)