Thanks Alex!
This makes sense to me now...
(de Fibonacci (N)
(let (F (list 2 1 1))
(cond
((= N 0) 0)
((= N 1) (caddr F))
((= N 2) (cadr F))
(T
(do (- N 3)
(rot F)
(set F (+ (cadr F) (caddr F))) )

Or strictly speaking...
(de Fibonacci (N)
(let (Fib '(2 1 1))
(set Fib 2 (cdr Fib) 1 (cddr Fib) 1)
(cond
((= N 0) 0)
((= N 1) (caddr Fib))
((= N 2) (cadr Fib))
(T
(do (- N 3)
(rot Fib)
(set Fib (+ (cadr

Hi Lindsay,
> (de Fibonacci (N)
>(let (Fib '(1 1 0))
> (do N
> (rot Fib)
> (set Fib (+ (cadr Fib) (caddr Fib))) )
>(car Fib) ) )
>
> The results are something like a 'co routine or 'job... in that Fib as a
> memory between calls and it is not re-initialized with

On Sat, Mar 11, 2017 at 11:20:21AM -0800, Lindsay John Lawrence wrote:
> Nm... After tinkering in the debugger.. using 'pp etc..
> I get it. I am still getting the (= code data) in picolisp.
Cool! Our mails overlapped! :)
♪♫ Alex
--
UNSUBSCRIBE:

Nm... After tinkering in the debugger.. using 'pp etc..
I get it. I am still getting the (= code data) in picolisp.
This gives the results I wanted.
(de Fibonacci (N)
(let (Fib '(1 1 0) R 0)
(do N
(rot Fib)
(set Fib (+ (cadr Fib) (caddr Fib)))
)
(setq R

Hi
I am having difficulty understanding the following..
This works as expected...
: (setq Sum '(1 1 0))
-> (1 1 0)
: (set Sum (+ (cadr Sum) (caddr Sum)))
-> 1
: (rot Sum)
-> (0 1 1)
: (set Sum (+ (cadr Sum) (caddr Sum)))
-> 2
: (rot Sum)
-> (1 2 1)
: (set Sum (+ (cadr Sum) (caddr Sum)))
-> 3
: