定義函式

2 views
Skip to first unread message

panfei

unread,
Sep 12, 2012, 11:14:27 PM9/12/12
to lisp-...@googlegroups.com
(defun our-third (x)
    (car (cdr (cdr x))))

defun的第一個參數代表我們自己定義的函式的名字。第二個參數 列表 (x),代表函數只接受一個參數:x。被以這種方式用作佔位符的symbol叫做變量。當這個變量代表一個函式的參數的時候,它也被稱為參數。

--
不学习,不知道

Reply all
Reply to author
Forward
0 new messages