LISP Scheme Part2
レス数が950を超えています。1000を超えると書き込みができなくなります。
0957デフォルトの名無しさん
NGNGこんなのはどうですか?
(defun agi (str)
(labels ((agi% (new-old-alist list)
(if (endp new-old-alist) list
(let* ((new (caar new-old-alist))
(old (cdar new-old-alist))
(pos (search (map 'list #'identity old) list)))
(if pos
(agi% new-old-alist
(concatenate 'list
(subseq list 0 pos)
new
(subseq list (+ pos (length old)))))
(agi% (cdr new-old-alist) list))))))
(map 'string #'identity
(agi% '(("1" . "1")
("2" . "2")
("3" . "3")
("4" . "4")
("5" . "5")
("6" . "6")
("7" . "7")
("8" . "8")
("9" . "9")
("0" . "0"))
(map 'list #'identity str)))))
(setq yen "1231234567890円")
(agi yen)
レス数が950を超えています。1000を超えると書き込みができなくなります。