Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,10 +0,0 @@
|
|||
(defun run-length-encode (str)
|
||||
(let (output)
|
||||
(with-temp-buffer
|
||||
(insert str)
|
||||
(goto-char (point-min))
|
||||
(while (not (eobp))
|
||||
(let* ((char (char-after (point)))
|
||||
(count (skip-chars-forward (string char))))
|
||||
(push (format "%d%c" count char) output))))
|
||||
(mapconcat #'identity (nreverse output) "")))
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
(require 'seq)
|
||||
|
||||
(defun run-length-encode (str)
|
||||
(let ((grouped (mapcar #'cdr (seq-group-by #'identity (string-to-list str)))))
|
||||
(apply #'concat (mapcar (lambda (items)
|
||||
(format "%d%c" (length items) (car items)))
|
||||
grouped))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue