Created
December 24, 2008 12:05
-
-
Save g000001/39670 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(declaim (inline foo)) | |
(defun foo (&rest args) | |
(format T "global foo!!! => ~{~A~^ ~}~%" args)) | |
(defun bar () | |
(list (apply #'foo '(1 2 3)) | |
(apply 'foo '(1 2 3)))) | |
(bar) | |
;global foo!!! => 1 2 3 | |
;global foo!!! => 1 2 3 | |
;; fooを再定義 | |
(defun foo (&rest args) | |
(format T "NEW global foo!!! => ~{~A~^ ~}~%" args)) | |
(bar) | |
;global foo!!! => 1 2 3 ;昔の定義 | |
;NEW global foo!!! => 1 2 3 | |
;; not inline | |
(declaim (notinline foo)) | |
(defun foo (&rest args) | |
(format T "global foo!!! => ~{~A~^ ~}~%" args)) | |
(defun bar () | |
(list (apply #'foo '(1 2 3)) | |
(apply 'foo '(1 2 3)))) | |
(bar) | |
;global foo!!! => 1 2 3 | |
;global foo!!! => 1 2 3 | |
;; fooを再定義 | |
(defun foo (&rest args) | |
(format T "NEW global foo!!! => ~{~A~^ ~}~%" args)) | |
(bar) | |
;NEW global foo!!! => 1 2 3 | |
;NEW global foo!!! => 1 2 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment