On Lisp メモ
関数の定義
(defun double (x) (* x 2))
def double (x) x * 2 end
(lambda (x) (* x 2))
lambda{|x| x * 2}
> (setq double 2) 2 > (double double) 4
> double = 2 => 2 > double double => 4
> (mapcar #'(lambda (x) (+ x 10)) '(1 2 3)) (11 12 13)
>[1,2,3].map{|x| x + 10} => [11, 12, 13]
> (mapcar #'+ '(1 2 3) '(10 100 1000)) (11 102 1003)
> Vector[1,2,3] + Vector[10,100,1000] => Vector[11, 102, 1003]