summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/boot.clj9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/boot.clj b/src/boot.clj
index a0ed368b..12258da8 100644
--- a/src/boot.clj
+++ b/src/boot.clj
@@ -1304,3 +1304,12 @@ test [v]
(let [m (re-matcher re s)]
(re-find m))))
+(defn rand
+ ([] (. Math (random)))
+ ([n] (* n (rand))))
+
+(defn rand-int [n]
+ (int (rand n)))
+
+(defmacro defn- [name & decls]
+ (list* `defn (with-meta name (assoc (meta name) :private true)) decls))