From 2595c8a853d26d4b495b3e3b8e737de3c8f67efd Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Wed, 10 Jun 2020 00:02:07 -0500 Subject: [PATCH] Properly hide private functions in boot.janet --- src/boot/boot.janet | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 7cda9497..47b4724d 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -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) ### ###