I'm trying to learn LISP after about 7 years not doing any kind of coding. I am slowly working my way through the Practical Common LISP book and have run into an example that I can't seem to follow.
In chapter 7, there is an example of a DO loop which results in the 11th Fibonacci number, 55.
Here is the code:
Code: Select all
(do ((n 0 (1+ n))
(cur 0 next)
(next 1 (+ cur next)))
((= 10 n) cur))
I'm clearly not following it through correctly on paper; can anyone break this down so I can see where I'm going wrong?
Thanks so much for the help!