ラムダ式とsymbol-function
公開日:
:
最終更新日:2014/01/29
LISP
読書メモ。今日はラムダ式までやった。
(defun plus1 (x)
"引数に1を足したものを返す"
(if (numberp x)
(1+ x)
1))
plus1
(symbol-function 'plus1)
(lambda (x)
"引数に1を足したものを返す"
(if (numberp x)
(1+ x)
1))
(plus1 5)
6
((lambda (x)
"引数に1を足したものを返す"
(if (numberp x)
(1+ x)
1))
5)
6