(let (items)
(dolist (item (split-string (buffer-substring (region-beginning) (region-end)) "\n"))
(let ((match (assoc item items)))
(if match
(setcdr match (1+ (cdr match)))
(push (cons item 1) items))))
(pp (sort items (lambda (x y) (< (cdr x) (cdr y))))))
No comments:
Post a Comment