~statianzo/sevenlangs

cb5b4ba9ed6c36221fb1f8506a8148d39adbb394 — Jason Staten 2 years ago 93896db
day2: fib and unless
1 files changed, 11 insertions(+), 0 deletions(-)

A clojure/src/two/core.clj
A clojure/src/two/core.clj => clojure/src/two/core.clj +11 -0
@@ 0,0 1,11 @@
(ns two.core)


(defn- nextfib [[a b]] [(+ a b) a])

(def fibs
  (map first
       (iterate nextfib [1 1])))

(defmacro unless [test body else]
  (list 'if (list 'not test) body else))
\ No newline at end of file