Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
(define (fib n) (fib-iter 1 0 0 1 n)) (define (fib-iter a b p q count) (cond ((= count 0) b) ((even? count) (fib-iter a b (+ (sqr p) (sqr q)) (+ (* 2 p q) (sqr q)) (/ count 2))) (else (fib-iter (+ (* b q) (* a q) (* a p)) (+ (* b p) (* a q)) p q (- count 1))))) (define (sqr x) (* x x)) (fib 4)
This paste will be private.
From the Design Piracy series on my blog: