Skip to content

Instantly share code, notes, and snippets.

@y2q-actionman
Created December 13, 2012 13:06
Show Gist options
  • Save y2q-actionman/4276284 to your computer and use it in GitHub Desktop.
Save y2q-actionman/4276284 to your computer and use it in GitHub Desktop.
example3 : DESTRUCTURING-BIND マクロ
(in-package :cl-user)
(destructuring-bind (a b c)
'(1 2 3)
(print a) ; 1
(print b) ; 2
(print c)) ; 3
(terpri)
(destructuring-bind (a b (c d) (e &rest f))
'(1 (2 3) (4 5) (6 7 8 9))
(print a) ; 1
(print b) ; (2 3)
(print c) ; 4
(print d) ; 5
(print e) ; 6
(print f)) ; (7 8 9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment