hi, I'm quite new to lisp and I have a problem I cannot solve by myself.
if I'm the 1000th person asking the same question -- I'm sorry -- just
ignore me.
I've got an array *arr* of expressions in the style
of ``(+ x (* 2 (sqrt x)))''-- in fact, they look like
(or, at least i tried hard to make them look like)
the body of a lambda function.
i also have the macro
(defmacro calculate (expr y)
`(apply (lambda (x) ,expr) '(,y)))
which works when I type something like
``(calculate (+ x (* 2 (sqrt x))) 1)
=> 3'',
but when I try, for exmaple,
``(calculate (aref *arr* 1) 1'',
it throws back the expression itself,
=> (+ X (* 2 (SQRT X)))...
what am I doing wrong? I spent about an hour trying different
combinations of ",", "'" ยทยทยทยท@"... what am I doing wrong? maybe I
need a totally different aproach?
thanks in advance
-- Ryszard Szopa
--
(email '(bies (at) hell org pl)) ;; Sancte Socrates, ora pro nobis!
(name (or '(ryszard szopa) 'bies)) ;; -- Erasmus
(www '(bies hell org pl)) ;;