[plt-scheme] Does the procedure know who called it and how many
times?
Majorinc, Kazimir
kazimir at chem.pmf.hr
Fri Jul 27 19:53:04 EDT 2007
I need "..." parts
(define (f x)
(let ((p ... ))
(display "I'm called by ") (display p))
(if (eq? p f)
(let ((n ...))
(display "I called myself recursively ")
(display n)
(display " times."))))
(do something)))
Is there any way I can do it without defining new argument of f or new
global variable?
Thank you.
More information about the plt-scheme
mailing list