(mod (X) (include *strict-cl-21*) ;; A macro-level function to pass through only real integers. (defun pass-through-integers (X) (if (not (number? X)) (x "not a number given to only-integers" X) X ) ) ;; A macro which at preprocessing time throws if the given argument ;; wasn't a lexical integer. (defmac only-integers (X) (pass-through-integers X)) ;; Note: when macro expanding, N is the N argument to the body of ;; the double macro, not the integer literal, so we use the function ;; version of pass-through-integers in the macro body. (defmac double (N) (* 2 (pass-through-integers N))) ;; Here the macro form of only-integers can determine whether the ;; double macro produced an integer or some other expression. (only-integers (double "hithere")) )