Properly hide private functions in boot.janet

This commit is contained in:
Calvin Rose 2020-06-10 00:02:07 -05:00
parent 2a9923999b
commit 2595c8a853
1 changed files with 8 additions and 6 deletions

View File

@ -692,7 +692,7 @@
fyx (f y x)] (- fyx))
(compare-primitive x y)))
(defn compare-reduce- [op xs]
(defn- compare-reduce [op xs]
(var r true)
(loop [i :range [0 (- (length xs) 1)]
:let [c (compare (xs i) (xs (+ i 1)))
@ -705,27 +705,29 @@
(defn compare=
"Equivalent of '=' but using compare function instead of primitive comparator"
[& xs]
(compare-reduce- = xs))
(compare-reduce = xs))
(defn compare<
"Equivalent of '<' but using compare function instead of primitive comparator"
[& xs]
(compare-reduce- < xs))
(compare-reduce < xs))
(defn compare<=
"Equivalent of '<=' but using compare function instead of primitive comparator"
[& xs]
(compare-reduce- <= xs))
(compare-reduce <= xs))
(defn compare>
"Equivalent of '>' but using compare function instead of primitive comparator"
[& xs]
(compare-reduce- > xs))
(compare-reduce > xs))
(defn compare>=
"Equivalent of '>=' but using compare function instead of primitive comparator"
[& xs]
(compare-reduce- >= xs))
(compare-reduce >= xs))
(put _env 'compare-reduce nil)
###
###