I'm sorry, missed that. Replace this line:
((not (listp exp)) "x")
with this line:
((not (listp exp)) (string exp))
Cheers,
On 04/25/2012 10:13 AM, Longdexin wrote:
> (defun conv (exp)
> (cond
> ((not (listp exp)) "x")
> ((equal (first exp) '+)
> (concatenate 'string "Plus[" (conv (second exp)) "," (conv (third exp)) "]"))
>
> The lines above are from the file 'convertToMathematic.lisp', lying in the
> ec/app/regression/ directory.
>
> The third line, '((not (listp exp)) "x")',seems to mean that, if what I get is not
> a list expression, then I will replace it with "x". This file works fine with a
> function who has only one variable. However, if the intention is to transform
> a Lisp s-expression with more than one variables, like "x","y" and "z", then
> what should I do to make the change?
>
--
Alexander Yakushev
"If or if-not. There is no try..catch-based flow control in Clojure."
-- Master Joda
|