1.2.0 permalink Arrow_down_16x16
  • (fibs)
Returns a lazy sequence of all the Fibonacci numbers.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/lazy_seqs.clj:82 top

(defn fibs
  "Returns a lazy sequence of all the Fibonacci numbers."
  []
  (map first (iterate (fn [[a b]] [b (+ a b)]) [0 1])))
Vars in clojure.contrib.lazy-seqs/fibs: defn first fn iterate map
Used in 0 other vars

Comments top

No comments for fibs. Log in to add a comment.