sub_seq function

Find sub-sequences of identical elements in a vector.