0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【CommonLisp】関数と同名の変数を定義することができる

Last updated at Posted at 2022-12-09

ソース

処理系はSBCLです

(defun hoge (list)
  (format t "~a~%" (append list (list 7 8))))

(defun main ()
  (let ((list (list 1 2)))
    (format t "~a~%" list)
    (format t "~a~%" (list 3 4))
    (hoge '(5 6))))

出力結果

(1 2)
(3 4)
(5 6 7 8)

以上

独り言

だから関数は'じゃなくて#'なのか
↑ (追記)funarg問題というのが発端らしい

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?