diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/collection/queue/priority.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/lux/data/collection/queue/priority.lux b/stdlib/source/lux/data/collection/queue/priority.lux index 34a87e51d..50f6f7de6 100644 --- a/stdlib/source/lux/data/collection/queue/priority.lux +++ b/stdlib/source/lux/data/collection/queue/priority.lux @@ -6,7 +6,7 @@ [data ["." maybe] [number - ["." nat ("#;." interval)]] + ["n" nat ("#@." interval)]] [collection [tree ["." finger (#+ Tree)]]]]]) @@ -16,8 +16,8 @@ (type: #export (Queue a) (Maybe (Tree Priority a))) -(def: #export max Priority nat;top) -(def: #export min Priority nat;bottom) +(def: #export max Priority n@top) +(def: #export min Priority n@bottom) (def: #export empty Queue @@ -27,7 +27,7 @@ (All [a] (-> (Queue a) (Maybe a))) (do maybe.monad [fingers queue] - (wrap (maybe.assume (finger.search (n/= (finger.tag fingers)) fingers))))) + (wrap (maybe.assume (finger.search (n.= (finger.tag fingers)) fingers))))) (def: #export (size queue) (All [a] (-> (Queue a) Nat)) @@ -42,7 +42,7 @@ 1 (#finger.Branch _ left right) - (n/+ (recur left) (recur right)))))) + (n.+ (recur left) (recur right)))))) (def: #export (member? Equivalence<a> queue member) (All [a] (-> (Equivalence a) (Queue a) a Bit)) @@ -68,12 +68,12 @@ node' (loop [node (get@ #finger.node fingers)] (case node (#finger.Leaf priority reference) - (if (n/= highest-priority priority) + (if (n.= highest-priority priority) #.None (#.Some node)) (#finger.Branch priority left right) - (if (n/= highest-priority (finger.tag (set@ #finger.node left fingers))) + (if (n.= highest-priority (finger.tag (set@ #finger.node left fingers))) (case (recur left) #.None (#.Some right) @@ -97,7 +97,7 @@ (def: #export (push priority value queue) (All [a] (-> Priority a (Queue a) (Queue a))) - (let [addition {#finger.monoid nat.maximum + (let [addition {#finger.monoid n.maximum #finger.node (#finger.Leaf priority value)}] (case queue #.None |