diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/control/interval.lux | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/lux/control/interval.lux b/stdlib/source/lux/control/interval.lux index ae8c6ce30..a1084290a 100644 --- a/stdlib/source/lux/control/interval.lux +++ b/stdlib/source/lux/control/interval.lux @@ -31,7 +31,7 @@ (do-template [<name> <comp>] [(def: #export (<name> interval) - (All [a] (-> (Interval a) Bool)) + (All [a] (-> (Interval a) Bit)) (let [(^open) interval] (<comp> bottom top)))] @@ -41,7 +41,7 @@ ) (def: #export (within? interval elem) - (All [a] (-> (Interval a) a Bool)) + (All [a] (-> (Interval a) a Bit)) (let [(^open) interval] (cond (inner? interval) (and (>= bottom elem) @@ -57,7 +57,7 @@ (do-template [<name> <limit>] [(def: #export (<name> elem interval) - (All [a] (-> a (Interval a) Bool)) + (All [a] (-> a (Interval a) Bit)) (let [(^open) interval] (= <limit> elem)))] @@ -66,7 +66,7 @@ ) (def: #export (borders? interval elem) - (All [a] (-> (Interval a) a Bool)) + (All [a] (-> (Interval a) a Bit)) (or (starts-with? elem interval) (ends-with? elem interval))) @@ -90,31 +90,31 @@ (def: top (pred bottom))))) (def: #export (precedes? reference sample) - (All [a] (-> (Interval a) (Interval a) Bool)) + (All [a] (-> (Interval a) (Interval a) Bit)) (let [(^open) reference limit (:: reference bottom)] (and (< limit (:: sample bottom)) (< limit (:: sample top))))) (def: #export (succeeds? reference sample) - (All [a] (-> (Interval a) (Interval a) Bool)) + (All [a] (-> (Interval a) (Interval a) Bit)) (precedes? sample reference)) (def: #export (meets? reference sample) - (All [a] (-> (Interval a) (Interval a) Bool)) + (All [a] (-> (Interval a) (Interval a) Bit)) (let [(^open) reference limit (:: reference bottom)] (and (<= limit (:: sample bottom)) (= limit (:: sample top))))) (def: #export (touches? reference sample) - (All [a] (-> (Interval a) (Interval a) Bool)) + (All [a] (-> (Interval a) (Interval a) Bit)) (or (meets? reference sample) (meets? sample reference))) (do-template [<name> <eq-side> <ineq> <ineq-side>] [(def: #export (<name> reference sample) - (All [a] (-> (Interval a) (Interval a) Bool)) + (All [a] (-> (Interval a) (Interval a) Bit)) (let [(^open) reference] (and (= (:: reference <eq-side>) (:: sample <eq-side>)) (<ineq> (:: reference <ineq-side>) (:: sample <ineq-side>)))))] @@ -125,7 +125,7 @@ (do-template [<name> <comp>] [(def: #export (<name> reference sample) - (All [a] (-> a (Interval a) Bool)) + (All [a] (-> a (Interval a) Bit)) (let [(^open) sample] (and (<comp> reference bottom) (<comp> reference top))))] @@ -141,7 +141,7 @@ (= top (:: sample top)))))) (def: #export (nested? reference sample) - (All [a] (-> (Interval a) (Interval a) Bool)) + (All [a] (-> (Interval a) (Interval a) Bit)) (cond (or (singleton? sample) (and (inner? reference) (inner? sample)) (and (outer? reference) (outer? sample))) @@ -162,7 +162,7 @@ )) (def: #export (overlaps? reference sample) - (All [a] (-> (Interval a) (Interval a) Bool)) + (All [a] (-> (Interval a) (Interval a) Bit)) (let [(^open) reference] (and (not (:: Equivalence<Interval> = reference sample)) (cond (singleton? sample) |