2018年9月19日

CLOS : Common Lisp 的面向对象支持

摘要: 1. defclass ( :accessor/reader/writer ; :initarg ; :initform 2. defgeneric 3. defmethod 1. 多重继承时的优先级(类似Ruby中的Ancestor Chain) 2. 面向对象的两种模型: ① obj. meth 阅读全文

posted @ 2018-09-19 01:36 王家恒 阅读(339) 评论(0) 推荐(0) 编辑

一道Common Lisp 宏的练习题

摘要: 这是《ANSI Common Lisp》第10章“宏”的习题第6题: 定义一个宏,接受一变量列表以及一个代码主体,并确保变量在代码主体被求值后恢复 (revert)到原本的数值 阅读全文

posted @ 2018-09-19 00:26 王家恒 阅读(165) 评论(0) 推荐(0) 编辑

导航