【发布时间】:2015-06-09 16:42:52
【问题描述】:
我想将泛型函数保存为变量:
(defvar *gf* (make-instance 'standard-generic-function)
但在添加方法时,我必须自己定义 call-next-method 和 next-method-p:
(add-method *gf*
(make-instane 'standard-method
:function (lambda (args next-methods)
(flet ((call-next-method () ...)
(next-method-p () ...))
(apply (lambda () ...) args)))))
如何调用定义call-next-method的方法?
有没有更简单的方法来做到这一点?
【问题讨论】:
标签: methods common-lisp clos mop generic-function