Reputation: 19717
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?
Upvotes: 1
Views: 107
Reputation: 82028
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.
Upvotes: 3
Reputation: 23465
According to this (random Google search result), the second term should be ((end-expression) return-value)
.
Upvotes: 1