diff options
Diffstat (limited to 'stdlib/source/library/lux/abstract/interval.lux')
-rw-r--r-- | stdlib/source/library/lux/abstract/interval.lux | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/stdlib/source/library/lux/abstract/interval.lux b/stdlib/source/library/lux/abstract/interval.lux index d16e140de..68865241c 100644 --- a/stdlib/source/library/lux/abstract/interval.lux +++ b/stdlib/source/library/lux/abstract/interval.lux @@ -35,7 +35,7 @@ (template [<name> <comp>] [(def: .public (<name> interval) (All (_ a) (-> (Interval a) Bit)) - (let [(^open ",#[0]") interval] + (let [(open ",#[0]") interval] (<comp> ,#bottom ,#top)))] [inner? (order.> ,#&order)] @@ -45,7 +45,7 @@ (def: .public (within? interval elem) (All (_ a) (-> (Interval a) a Bit)) - (let [(^open ",#[0]") interval] + (let [(open ",#[0]") interval] (cond (inner? interval) (and (order.>= ,#&order ,#bottom elem) (order.<= ,#&order ,#top elem)) @@ -61,7 +61,7 @@ (template [<name> <limit>] [(def: .public (<name> elem interval) (All (_ a) (-> a (Interval a) Bit)) - (let [(^open "[0]") interval] + (let [(open "[0]") interval] (= <limit> elem)))] [starts_with? bottom] @@ -96,7 +96,7 @@ (def: .public (precedes? reference sample) (All (_ a) (-> (Interval a) (Interval a) Bit)) - (let [(^open "[0]") reference + (let [(open "[0]") reference limit (# reference bottom)] (and (< limit (# sample bottom)) (< limit (# sample top))))) @@ -108,7 +108,7 @@ (template [<name> <comp>] [(def: .public (<name> reference sample) (All (_ a) (-> a (Interval a) Bit)) - (let [(^open ",#[0]") sample] + (let [(open ",#[0]") sample] (and (<comp> reference ,#bottom) (<comp> reference ,#top))))] @@ -118,7 +118,7 @@ (def: .public (meets? reference sample) (All (_ a) (-> (Interval a) (Interval a) Bit)) - (let [(^open ",#[0]") reference + (let [(open ",#[0]") reference limit (# reference bottom)] (and (,#= limit (# sample top)) (order.<= ,#&order limit (# sample bottom))))) @@ -131,7 +131,7 @@ (template [<name> <eq_side> <ineq> <ineq_side>] [(def: .public (<name> reference sample) (All (_ a) (-> (Interval a) (Interval a) Bit)) - (let [(^open ",#[0]") reference] + (let [(open ",#[0]") reference] (and (,#= (# reference <eq_side>) (# sample <eq_side>)) (<ineq> ,#&order @@ -146,7 +146,7 @@ (All (_ a) (Equivalence (Interval a))) (def: (= reference sample) - (let [(^open ",#[0]") reference] + (let [(open ",#[0]") reference] (and (,#= ,#bottom (# sample bottom)) (,#= ,#top (# sample top)))))) @@ -155,7 +155,7 @@ (cond (or (singleton? sample) (and (inner? reference) (inner? sample)) (and (outer? reference) (outer? sample))) - (let [(^open ",#[0]") reference] + (let [(open ",#[0]") reference] (and (order.>= ,#&order (# reference bottom) (# sample bottom)) (order.<= ,#&order (# reference top) (# sample top)))) @@ -164,7 +164,7 @@ #0 ... (and (outer? reference) (inner? sample)) - (let [(^open ",#[0]") reference] + (let [(open ",#[0]") reference] (or (and (order.>= ,#&order (# reference bottom) (# sample bottom)) (order.> ,#&order (# reference bottom) (# sample top))) (and (,#< (# reference top) (# sample bottom)) @@ -173,7 +173,7 @@ (def: .public (overlaps? reference sample) (All (_ a) (-> (Interval a) (Interval a) Bit)) - (let [(^open ",#[0]") reference] + (let [(open ",#[0]") reference] (and (not (# ..equivalence = reference sample)) (cond (singleton? sample) #0 |