diff options
Diffstat (limited to 'stdlib/source/lux/data/coll/ordered.lux')
-rw-r--r-- | stdlib/source/lux/data/coll/ordered.lux | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/stdlib/source/lux/data/coll/ordered.lux b/stdlib/source/lux/data/coll/ordered.lux index 47bf7cd65..4735f38ae 100644 --- a/stdlib/source/lux/data/coll/ordered.lux +++ b/stdlib/source/lux/data/coll/ordered.lux @@ -112,8 +112,8 @@ (case (get@ #color self) #Red (case (get@ #left self) - (^=> (#;Some left) - [(get@ #color left) #Red]) + (^multi (#;Some left) + [(get@ #color left) #Red]) (red (get@ #value self) (#;Some (blacken left)) (#;Some (black (get@ #value parent) @@ -122,8 +122,8 @@ _ (case (get@ #right self) - (^=> (#;Some right) - [(get@ #color right) #Red]) + (^multi (#;Some right) + [(get@ #color right) #Red]) (red (get@ #value right) (#;Some (black (get@ #value self) (get@ #left self) @@ -148,8 +148,8 @@ (case (get@ #color self) #Red (case (get@ #right self) - (^=> (#;Some right) - [(get@ #color right) #Red]) + (^multi (#;Some right) + [(get@ #color right) #Red]) (red (get@ #value self) (#;Some (black (get@ #value parent) (get@ #left parent) @@ -158,8 +158,8 @@ _ (case (get@ #left self) - (^=> (#;Some left) - [(get@ #color left) #Red]) + (^multi (#;Some left) + [(get@ #color left) #Red]) (red (get@ #value left) (#;Some (black (get@ #value parent) (get@ #left parent) @@ -229,18 +229,18 @@ (def: (left-balance value ?left ?right) (All [a] (-> a (Maybe (Node a)) (Maybe (Node a)) (Node a))) (case ?left - (^=> (#;Some left) - [(get@ #color left) #Red] - [(get@ #left left) (#;Some left.left)] - [(get@ #color left.left) #Red]) + (^multi (#;Some left) + [(get@ #color left) #Red] + [(get@ #left left) (#;Some left.left)] + [(get@ #color left.left) #Red]) (red (get@ #value left) (#;Some (blacken left.left)) (#;Some (black value (get@ #right left) ?right))) - (^=> (#;Some left) - [(get@ #color left) #Red] - [(get@ #right left) (#;Some left.right)] - [(get@ #color left.right) #Red]) + (^multi (#;Some left) + [(get@ #color left) #Red] + [(get@ #right left) (#;Some left.right)] + [(get@ #color left.right) #Red]) (red (get@ #value left.right) (#;Some (black (get@ #value left) (get@ #left left) @@ -255,18 +255,18 @@ (def: (right-balance value ?left ?right) (All [a] (-> a (Maybe (Node a)) (Maybe (Node a)) (Node a))) (case ?right - (^=> (#;Some right) - [(get@ #color right) #Red] - [(get@ #right right) (#;Some right.right)] - [(get@ #color right.right) #Red]) + (^multi (#;Some right) + [(get@ #color right) #Red] + [(get@ #right right) (#;Some right.right)] + [(get@ #color right.right) #Red]) (red (get@ #value right) (#;Some (black value ?left (get@ #left right))) (#;Some (blacken right.right))) - (^=> (#;Some right) - [(get@ #color right) #Red] - [(get@ #left right) (#;Some right.left)] - [(get@ #color right.left) #Red]) + (^multi (#;Some right) + [(get@ #color right) #Red] + [(get@ #left right) (#;Some right.left)] + [(get@ #color right.left) #Red]) (red (get@ #value right.left) (#;Some (black value ?left (get@ #left right.left))) (#;Some (black (get@ #value right) @@ -279,20 +279,20 @@ (def: (balance-left-remove value ?left ?right) (All [a] (-> a (Maybe (Node a)) (Maybe (Node a)) (Node a))) (case ?left - (^=> (#;Some left) - [(get@ #color left) #Red]) + (^multi (#;Some left) + [(get@ #color left) #Red]) (red value (#;Some (blacken left)) ?right) _ (case ?right - (^=> (#;Some right) - [(get@ #color right) #Black]) + (^multi (#;Some right) + [(get@ #color right) #Black]) (right-balance value ?left (#;Some (redden right))) - (^=> (#;Some right) - [(get@ #color right) #Red] - [(get@ #left right) (#;Some right.left)] - [(get@ #color right.left) #Black]) + (^multi (#;Some right) + [(get@ #color right) #Red] + [(get@ #left right) (#;Some right.left)] + [(get@ #color right.left) #Black]) (red (get@ #value right.left) (#;Some (black value ?left (get@ #left right.left))) (#;Some (right-balance (get@ #value right) @@ -306,20 +306,20 @@ (def: (balance-right-remove value ?left ?right) (All [a] (-> a (Maybe (Node a)) (Maybe (Node a)) (Node a))) (case ?right - (^=> (#;Some right) - [(get@ #color right) #Red]) + (^multi (#;Some right) + [(get@ #color right) #Red]) (red value ?left (#;Some (blacken right))) _ (case ?left - (^=> (#;Some left) - [(get@ #color left) #Black]) + (^multi (#;Some left) + [(get@ #color left) #Black]) (left-balance value (#;Some (redden left)) ?right) - (^=> (#;Some left) - [(get@ #color left) #Red] - [(get@ #right left) (#;Some left.right)] - [(get@ #color left.right) #Black]) + (^multi (#;Some left) + [(get@ #color left) #Red] + [(get@ #right left) (#;Some left.right)] + [(get@ #color left.right) #Black]) (red (get@ #value left.right) (#;Some (left-balance (get@ #value left) (:: Functor<Maybe> map redden (get@ #left left)) @@ -419,8 +419,8 @@ [side-outcome _] (if go-left? (case (get@ #left root) - (^=> (#;Some left) - [(get@ #color left) #Black]) + (^multi (#;Some left) + [(get@ #color left) #Black]) [(#;Some (balance-left-remove root-val side-outcome (get@ #right root))) false] @@ -428,8 +428,8 @@ [(#;Some (red root-val side-outcome (get@ #right root))) false]) (case (get@ #right root) - (^=> (#;Some right) - [(get@ #color right) #Black]) + (^multi (#;Some right) + [(get@ #color right) #Black]) [(#;Some (balance-right-remove root-val (get@ #left root) side-outcome)) false] |