I’m new to Common Lisp. I tried out the following do form:
(do ((n 0 (+ n 1)))
(< n 10)
(print n))
Clisp responds with:
*** - IF: variable < has no value
From my understanding, the do form is as follows:
(do (<lexically scoped variables> [per-iteration-expression])
(end-expression)
<statements>)
Where’s the error in my understanding of this?
Forgive me, my Lisp is rusty, but shouldn’t that be a
>?And then shouldn’t it be
((> n 10))? (Two parens, not one. You need something evaluated there).This could be completely wrong, but that would be my next try.