Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
(defn nacci [init]
|
||||
(letfn [(s [] (lazy-cat init (apply map + (map #(drop % (s)) (range (count init))))))]
|
||||
(s)))
|
||||
|
||||
(let [show (fn [name init] (println "first 20" name (take 20 (nacci init))))]
|
||||
(show "Fibonacci" [1 1])
|
||||
(show "Tribonacci" [1 1 2])
|
||||
(show "Tetranacci" [1 1 2 4])
|
||||
(show "Lucas" [2 1]))
|
||||
Loading…
Add table
Add a link
Reference in a new issue