diff options
-rw-r--r-- | src/boot.clj | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/boot.clj b/src/boot.clj index 3618ce0d..ad43cb53 100644 --- a/src/boot.clj +++ b/src/boot.clj @@ -234,6 +234,18 @@ (recur y (first more) (rest more)) (thisfn y (first more)))))) +(defn max + ([x] x) + ([x y] (if (> x y) x y)) + ([x y & more] + (reduce thisfn (thisfn x y) more))) + +(defn min + ([x] x) + ([x y] (if (< x y) x y)) + ([x y & more] + (reduce thisfn (thisfn x y) more))) + (defn inc [x] (. clojure.lang.Num (inc x))) @@ -910,5 +922,6 @@ aget aset aset-boolean aset-int aset-long aset-float aset-double aset-short aset-byte make-array macroexpand-1 macroexpand + max min )) |