Add save functionality and shortcuts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
;; Closure Scope Test
|
||||
;; Benchmark: 7.9us
|
||||
;; Benchmark: 9.0us
|
||||
;; Output: 15
|
||||
(do
|
||||
(def make-adder (fn [x]
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
;; Complex Data Structure Test
|
||||
;; Benchmark: 66.8us
|
||||
;; Benchmark: 72.7us
|
||||
;; Output: {:input 10, :name "Fibonacci", :output 55}
|
||||
(do
|
||||
(def fib (fn [n]
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
;; Fibonacci Recursive
|
||||
;; Benchmark: 62.9us
|
||||
;; Benchmark: 68.3us
|
||||
;; Output: 55
|
||||
(do
|
||||
(def fib (fn [n]
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
;; Higher-Order Function Example
|
||||
;; Benchmark: 7.4us
|
||||
;; Benchmark: 8.4us
|
||||
;; Output: 25
|
||||
(do
|
||||
(def apply (fn [f x] (f x)))
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
;; Benchmark: 2.7ms
|
||||
;; Output: "done"
|
||||
(do
|
||||
(def count_down (fn [n]
|
||||
(if (< n 1)
|
||||
"done"
|
||||
(count_down (- n 1)))))
|
||||
|
||||
(count_down 1000000)
|
||||
(count_down 10000)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user