From: Alexey D. <ade...@co...> - 2004-12-06 03:01:10
|
Hello, Szymon <r5z...@o2...> writes: > I have not idea how to implement ARGLIST function in sbcl. > > Please help. > > (defun arglist (fn) ; from cvs: clocc/clocc/src/port/sys.lisp > "Return the signature of the function." > ;; > ;; ..... > ;; > #+sbcl > (let ((f (coerce fn 'function))) > (typecase f > (STANDARD-GENERIC-FUNCTION (sb-pcl:generic-function-lambda-list f)) > (FUNCTION (sb-kernel:%simple-fun-arglist f))))) (FUNCTION (sb-kernel:%simple-fun-arglist (sb-kernel:%closure-fun f))) Or (require :sb-introspect) (defun arglist (fn) (sb-introspect:function-arglist fn)) -- Regards, Alexey Dejneka "Alas, the spheres of truth are less transparent than those of illusion." -- L.E.J. Brouwer |