implemented p10 - encode - run-length encoding of a list