Skip to content

Instantly share code, notes, and snippets.

@dbbbit
Last active August 29, 2015 14:06
Show Gist options
  • Save dbbbit/9acb5dfdc94f7ab1145d to your computer and use it in GitHub Desktop.
Save dbbbit/9acb5dfdc94f7ab1145d to your computer and use it in GitHub Desktop.
(def fab (fn [x, tmp]
(if (or (= x 0) (= x 1))
tmp
(fab (- x 1) (* tmp x)))))
(println (= 24 (fab 4 1)))
(println (= 1 (fab 0 1)))
(ns test
(:import java.util.Date))
(def st (.getTime (Date.)))
(println
"function start >>\n"
"\nend\n"
)
(def et (.getTime (Date.)))
(println
"cost " (- et st) "ms")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment