- プログラミングのお題スレ Part8©2ch.net
137 :デフォルトの名無しさん[sage]:2015/11/18(水) 21:29:20.89 ID:4nC9re2c - >>132 Emacs Lisp
(require 'cl-lib) cl-lib (defun f (l) (while l (let (m) (cl-mapl (lambda (s) (princ (car s)) (let ((s (let ((x (nth 0 s)) (y (nth 1 s))) (and y (if (eq x y) x (car (remove x (remove y '(A B C))))))))) (and s (push s m)))) l) (terpri) (setq l (reverse m))))) f (f '(A B B A C A C B B A)) ABBACACBBA CBCBBBABC AAABBCCA AACBACB ABACBA CCBAC CACB BBA BC A nil
|
|