mirror of
https://github.com/janet-lang/janet
synced 2025-02-03 10:49:09 +00:00
Properly hide private functions in boot.janet
This commit is contained in:
parent
2a9923999b
commit
2595c8a853
@ -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)
|
||||
|
||||
###
|
||||
###
|
||||
|
Loading…
Reference in New Issue
Block a user