Definition. Definitions, Datatypes, Induction, Functions › The compress function [isa-0023]

primrec compress :: ‹oot list ⇒ oots› where ‹compress [] = Empty› | ‹compress (x#xs) = prepend x 1 (compress xs)›