projects
/
sicp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
188e7aa
)
added a handy error function
author
Ramakrishnan Muthukrishnan
<vu3rdd@gmail.com>
Tue, 8 Jun 2010 12:06:48 +0000
(17:36 +0530)
committer
Ramakrishnan Muthukrishnan
<vu3rdd@gmail.com>
Tue, 8 Jun 2010 12:06:48 +0000
(17:36 +0530)
src/sicp/utils.clj
patch
|
blob
|
history
diff --git
a/src/sicp/utils.clj
b/src/sicp/utils.clj
index 258ac6080cb2b19e170c13cb04fcc4da42f48e24..516b0141eba9306c16ded1167c800cb8d5407110 100644
(file)
--- a/
src/sicp/utils.clj
+++ b/
src/sicp/utils.clj
@@
-42,6
+42,9
@@
(defn approx-equal [x y]
(< (abs (- x y)) 0.00001))
+(defn error [^String string]
+ (throw (Exception. string)))
+
(defmacro microbench
" Evaluates the expression n number of times, returning the average
time spent in computation, removing highest and lowest values.