I see. Actually Gather
is supposed to do the job but it doesn't:
t = {17, 9, 29, 23, 1, 32, 14, 21, 11, 24, 2, 7, 31, 16, 22, 5, 3, 18,
20, 25, 30, 26, 12, 8, 15, 13, 27, 19, 4, 10, 6, 28};
Gather[t, (Abs[#1 - #2] <= 1) &]
In this case the should all line up in one sublist. They don't. Why?