[CM] need macro help!

bil at ccrma.Stanford.EDU bil at ccrma.Stanford.EDU
Wed Sep 8 11:03:25 PDT 2021


This isn't helpful, in fact it's ugly, but I can't
resist mentioning:

(set! *#readers*
   (cons (cons #\% (lambda (str)
		   (list 's4m-expr-inputs
			 (string->number (substring str 1)))))
	 *#readers*))

> (+ #%1 (+ #%2 #%3))

which returns 66 after expanding at read time to:

(+ (s4m-expr-inputs 1) (+ (s4m-expr-inputs 2) (s4m-expr-inputs 3)))



More information about the Cmdist mailing list