<div dir="ltr">I am apparently in over my head, I&#39;m pretty darned new to defmacro&#39;ing. If anyone can help with this, it would help me add a very nice ability to scheme for max!<div><br></div><div>thanks!</div><div><br>; desired behaviour<br>; (s4m-run-expr &quot;(+ %1 %2 %3)&quot;)<br>; should run as (+1 (expr-ins 1) (expr-ins 2) (expr-ins 3))<br><br>; error i get:<br>;make-iterator argument, input-sexp, is a symbol but should be a sequence<br>;    (cons &#39;eval (list (map (lambda...<br><br>; these get set elsewhere and represent values that <br>; will expand %1 %2 etc<br>(define s4m-expr-inputs (vector &#39;() 11 22 33)) <br><br>(define (string-&gt;sexp text)<br>  &quot;convert a string of an sexp to an sexp&quot;<br>  (read (open-input-string text)))<br><br>(define-macro (run-expr sexp)<br>  (cons &#39;eval (list<br>    (map <br>      (lambda(token)<br>        (if (and (symbol? token) (eq? ((symbol-&gt;string token) 0) #\%))<br>          `(s4m-expr-inputs ,(string-&gt;number (list-&gt;string (cdr (string-&gt;list (symbol-&gt;string token))))))<br>          token))<br>      sexp))))<br><br>(define (s4m-run-expr sexp-str)<br>  (let ((input-sexp (string-&gt;sexp sexp-str)))<br>    (run-expr input-sexp)))<br><br></div></div>