mirror of
https://github.com/janet-lang/janet
synced 2024-06-16 02:09:56 +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))
|
fyx (f y x)] (- fyx))
|
||||||
(compare-primitive x y)))
|
(compare-primitive x y)))
|
||||||
|
|
||||||
(defn compare-reduce- [op xs]
|
(defn- compare-reduce [op xs]
|
||||||
(var r true)
|
(var r true)
|
||||||
(loop [i :range [0 (- (length xs) 1)]
|
(loop [i :range [0 (- (length xs) 1)]
|
||||||
:let [c (compare (xs i) (xs (+ i 1)))
|
:let [c (compare (xs i) (xs (+ i 1)))
|
||||||
|
@ -705,27 +705,29 @@
|
||||||
(defn compare=
|
(defn compare=
|
||||||
"Equivalent of '=' but using compare function instead of primitive comparator"
|
"Equivalent of '=' but using compare function instead of primitive comparator"
|
||||||
[& xs]
|
[& xs]
|
||||||
(compare-reduce- = xs))
|
(compare-reduce = xs))
|
||||||
|
|
||||||
(defn compare<
|
(defn compare<
|
||||||
"Equivalent of '<' but using compare function instead of primitive comparator"
|
"Equivalent of '<' but using compare function instead of primitive comparator"
|
||||||
[& xs]
|
[& xs]
|
||||||
(compare-reduce- < xs))
|
(compare-reduce < xs))
|
||||||
|
|
||||||
(defn compare<=
|
(defn compare<=
|
||||||
"Equivalent of '<=' but using compare function instead of primitive comparator"
|
"Equivalent of '<=' but using compare function instead of primitive comparator"
|
||||||
[& xs]
|
[& xs]
|
||||||
(compare-reduce- <= xs))
|
(compare-reduce <= xs))
|
||||||
|
|
||||||
(defn compare>
|
(defn compare>
|
||||||
"Equivalent of '>' but using compare function instead of primitive comparator"
|
"Equivalent of '>' but using compare function instead of primitive comparator"
|
||||||
[& xs]
|
[& xs]
|
||||||
(compare-reduce- > xs))
|
(compare-reduce > xs))
|
||||||
|
|
||||||
(defn compare>=
|
(defn compare>=
|
||||||
"Equivalent of '>=' but using compare function instead of primitive comparator"
|
"Equivalent of '>=' but using compare function instead of primitive comparator"
|
||||||
[& xs]
|
[& xs]
|
||||||
(compare-reduce- >= xs))
|
(compare-reduce >= xs))
|
||||||
|
|
||||||
|
(put _env 'compare-reduce nil)
|
||||||
|
|
||||||
###
|
###
|
||||||
###
|
###
|
||||||
|
|
Loading…
Reference in New Issue
Block a user