Skip to content

Instantly share code, notes, and snippets.

@shimomura1004
Created September 6, 2014 02:43
Show Gist options
  • Save shimomura1004/1228bc6cd4e031b322bf to your computer and use it in GitHub Desktop.
Save shimomura1004/1228bc6cd4e031b322bf to your computer and use it in GitHub Desktop.
defun と defvar の違い
;; 関数の名前空間に定義
(defun f (x y) (+ x y))
(f 1 2)
(funcall #'f 1 2)
;; 変数の名前空間に定義
(defvar g (lambda (x y) (+ x y)))
(funcall g 1 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment