Clean up and rearrange

This commit is contained in:
Nathan Braswell
2022-05-07 16:09:16 -04:00
parent 08c01257f3
commit ca68826fbc
52 changed files with 577 additions and 344 deletions

View File

@@ -0,0 +1,14 @@
(ns clojure-fib.core
(:gen-class))
(defn fib
[n]
(cond (= n 0) 1
(= n 1) 1
:else (+ (fib (- n 1)) (fib (- n 2)))))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(println "Enter to fib: ")
(println "was " (fib (Integer/parseInt (read-line)))))