Atom - Œr - Run Length Encode

Characters: Π, r

Tags: miscellaneous , array , number , vectorize

Arity: monadic

This atom is monadic, which means it takes one argument.

Functionality

Encode a list into a list of [element, repetitions] pairs. Vectorizes at depth 1.

Details

For example, “aab” Œr returns [["a", 2], ["b", 1]].