Changes for clojure.core/iterate

maacl on Thu, 02 Jan 2014
;; demonstrating the power of iterate
;; to generate the Fibonacci sequence
;; uses +' to promote to BigInt
user=> (def fib (map first (iterate (fn [[a b]] [b (+' a b)]) [0 1])))
#'user/fib

user=> (take 10 fib)
(0 1 1 2 3 5 8 13 21 34)
Bobby on Thu, 11 Oct 2012
;; demonstrating the power of iterate
;; to generate the Fibonacci sequence
user=> (def fib (map first (iterate (fn [[a b]] [b (+ a b)]) [0 1])))
#'user/fib

user=> (take 10 fib)
(0 1 1 2 3 5 8 13 21 34)
Bobby on Thu, 11 Oct 2012
;; demonstrating the power of iterate
;; to generate the Fibonacci sequence
user=> (def fib (map first (iterate (fn [[a b]] [b (+ a b)]) [0 1])))
#'user/fib

user=> (take 10 fib)
(0 1 2 3 5 8 13 21 34 55)
shockbob on Sat, 16 Jul 2011
;; demonstrating the power of iterate
;; to generate the Fibonacci sequence
user=> (def fib (map first (iterate (fn [[a b]] [b (+ a b)]) [1 1])))
#'user/fib

user=> (take 10 fib)
(1 1 2 3 5 8 13 21 34 55)
shockbob on Sat, 16 Jul 2011
;; demonstrating the power of destructing and iterate
;; to generate the Fibonacci sequence
user=> (def fib (map first (iterate (fn [[a b]] [b (+ a b)]) [1 1])))
#'user/fib
user=> (take 10 fib)
(1 1 2 3 5 8 13 21 34 55)