Sha256: 2e0d07f0ebb41bcc3d95a92ebeb7272a5f7811131f5dcd62ff15e3f4980f9677

Contents?: true

Size: 154 Bytes

Versions: 5

Compression:

Stored size: 154 Bytes

Contents

(define (fib-iter n f0 f1)
  (cond ((= n 0) f0)
 	((= n 1) f1)
 	(else (fib-iter (- n 1) f1 (+ f0 f1)))))

(define (fib n)
  (fib-iter n 0 1))

(fib 100)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rus3-0.2.1 examples/fib.scm
rus3-0.2.0 examples/fib.scm
rus3-0.1.2 examples/fib.scm
rus3-0.1.1 examples/fib.scm
rus3-0.1.0 examples/fib.scm