github 에 올렸습니다.
git clone git@github.com:rafael81/clj-anagram.git
;; load paredit
(load "paredit.el")
(add-hook 'emacs-lisp-mode-hook(lambda ()(paredit-mode +1)(setq abbrev-mode t)))
(add-hook 'lisp-mode-hook(lambda ()(paredit-mode +1)(setq abbrev-mode t)))
(add-hook 'clojure-mode-hook(lambda ()(paredit-mode +1)(setq abbrev-mode t)))
(add-hook 'slime-repl-mode-hook (lambda () (paredit-mode +1)))(add-hook 'slime-mode-hook (lambda () (paredit-mode +1)))
(setq slime-net-coding-system 'utf-8-unix)
moinmoin은 Debian, Apache, Ubuntu 등 유명한 곳에서도 사용중인 위키 엔진입니다. | 코드: |
| ... def setencoding(): """Set the string encoding used by the Unicode implementation. The default is 'ascii', but if you're willing to experiment, you can change this.""" encoding = "mbcs" |
(destructuring-bind (x y z) (list 1 2 3)
(list :x x :y y :z z)) ==> (:X 1 :Y 2 :Z 3)
(destructuring-bind (x y z) (list 1 (list 2 20) 3)
(list :x x :y y :z z)) ==> (:X 1 :Y (2 20) :Z 3)
(destructuring-bind (x (y1 y2) z) (list 1 (list 2 20) 3)
(list :x x :y1 y1 :y2 y2 :z z)) ==> (:X 1 :Y1 2 :Y2 20 :Z 3)
(destructuring-bind (x (y1 &optional y2) z) (list 1 (list 2 20) 3)
(list :x x :y1 y1 :y2 y2 :z z)) ==> (:X 1 :Y1 2 :Y2 20 :Z 3)
(destructuring-bind (x (y1 &optional y2) z) (list 1 (list 2) 3)
(list :x x :y1 y1 :y2 y2 :z z)) ==> (:X 1 :Y1 2 :Y2 NIL :Z 3)
(destructuring-bind (&key x y z) (list :x 1 :y 2 :z 3)
(list :x x :y y :z z)) ==> (:X 1 :Y 2 :Z 3)
(destructuring-bind (&key x y z) (list :z 1 :y 2 :x 3)
(list :x x :y y :z z)) ==> (:X 3 :Y 2 :Z 1)
(destructuring-bind ((&key w x) &rest y) '((:w 3) a)
(list w x y))
(3 NIL (A))
&key 에 의해서 w 는 3 이되고
x 는 nil
y 는 a 지만 &rest 에 의해서 리스트화된다.
아래의 2개의 결과가 같다는것을 참고.
CL-USER> (destructuring-bind (x y . z) '(1 2 3)
(list x y z))
(1 2 (3))
CL-USER> (destructuring-bind (x y &rest z) '(1 2 3)
(list x y z))
(1 2 (3))