in reply to grouping consecutive integers

It shows some odd behaviour if you have duplicate numbers in your input array.

qw( 20 2 3 4 5 6 7 23 19 5 17 25 30 11 4 12 22 5 21 68 103829 24 18 )

results in

103829->0 2->2 4->1 11->1 5->2 68->0 30->0 17->8
It seems duplicate numbers start new sequences but triplicate (or quadruplicate, ...) numbers don't start separate sequences of their own.

The 4->1 really meaning that 4 is followed by another 4!

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law