Nature Fibonacci Sequence in Nature

Tomenable

Elite member
Messages
5,419
Reaction score
1,337
Points
113
Location
Poland
Ethnic group
Polish
Y-DNA haplogroup
R1b-L617
mtDNA haplogroup
W6a
 
 
 
Fibonacci sequence function returning the first n fibonacci numbers in bad Clojure code courtesy of davef
Code:
(#(if (= % 1) [1] (if (= % 2) [1 1] (reduce (fn [buffer rng](cons (+ (first buffer)(second buffer))buffer))[1 1] (range (- % 2)))))
 

This thread has been viewed 3057 times.

Back
Top