Re: Capturing input-output relation of a function
Douglas Katzman via Sbcl-help <[email protected]> Tue, 21 Jan 2025 08:27:56 -0500
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <CAOrNaswGOcfE8fjgnaSLxMgCJS=bye-zk0W2dRe3zx90vONN9g@mail.gmail.com> |
* (defvar *ff-args/results* nil)
*FF-ARGS/RESULTS*
* (sb-int:encapsulate 'ff 'wrap (lambda (realfun arg) (let ((answer
(funcall realfun arg))) (push (list arg answer) *ff-args/results*) answer)))
#<FUNCTION SB-IMPL::ENCAPSULATION {1000BD539B}>
* (ff 3)
6
* (reverse *ff-args/results*)
((1 1) (2 2) (3 6))
_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help