; P10 Run-length encoding of a list. ; Use the result of problem P09 to implement the so-called run-length ; encoding data compression method. Consecutive duplicates of elements ; are encoded as arrays [N, E] where N is the number of duplicates of the ; element E. (use "p09.neb") ; NOTE: this runs everything at this juncture, not just def/func (func encode (lst) (map (lambda (item) (list (length item) (first item))) lst)) (print (->string (encode (pack-dup a))))