摘要: ;;;;函数 (defun name (parameter*)"Optional documentation string"body-form*);;;形参列表;;必要形参,个数必须一致;;可选形参&optional(defun foo (a b &optional c d)(list a b c d));;a b 必须输入 c d 可以不输入,默认nil;;默认值,并且可以用前面参数的值进行运算... 阅读全文
posted @ 2012-04-11 08:42 舜耕山翁 阅读(158) 评论(0) 推荐(0) 编辑
摘要: (defvar *db* nil) (defun make-cd (title artist rating ripped) (list :title title :artist artist :rating rating :ripped ripped))(defun add-record (cd) (push cd *db*))(defun dump-db () (dolist (cd *db*)... 阅读全文
posted @ 2012-04-10 17:37 舜耕山翁 阅读(175) 评论(0) 推荐(0) 编辑