[CM] __func__ in lisp?

Bill Schottstaedt bil at ccrma.Stanford.EDU
Thu Jul 23 12:34:16 PDT 2009

> I think this thing almost has to be a reader macro to work right.

for file and line, perhaps, but, as an experiment, I've implemented it
as __func__ (a variable, defined only within a named closure; its
value is the symbol for the function being defined).  

(define (hiho arg) (list arg __func__))
(hiho 1)
(1 hiho)

hmmm, maybe it should be defined at top-level so you don't always
have to check that, but it's value outside  a named closure would be

More information about the Cmdist mailing list