diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/data/collection/queue.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/library/lux/data/collection/queue.lux b/stdlib/source/library/lux/data/collection/queue.lux index 5260d808d..650ed17ff 100644 --- a/stdlib/source/library/lux/data/collection/queue.lux +++ b/stdlib/source/library/lux/data/collection/queue.lux @@ -28,8 +28,8 @@ (def: .public (list queue) (All (_ a) (-> (Queue a) (List a))) - (let [(^slots [#front #rear]) queue] - (list#composite #front (list.reversed #rear)))) + (let [(^open "_[0]") queue] + (list#composite _#front (list.reversed _#rear)))) (def: .public front (All (_ a) (-> (Queue a) (Maybe a))) @@ -37,9 +37,9 @@ (def: .public (size queue) (All (_ a) (-> (Queue a) Nat)) - (let [(^slots [#front #rear]) queue] - (n.+ (list.size #front) - (list.size #rear)))) + (let [(^open "_[0]") queue] + (n.+ (list.size _#front) + (list.size _#rear)))) (def: .public empty? (All (_ a) (-> (Queue a) Bit)) @@ -47,9 +47,9 @@ (def: .public (member? equivalence queue member) (All (_ a) (-> (Equivalence a) (Queue a) a Bit)) - (let [(^slots [#front #rear]) queue] - (or (list.member? equivalence #front member) - (list.member? equivalence #rear member)))) + (let [(^open "_[0]") queue] + (or (list.member? equivalence _#front member) + (list.member? equivalence _#rear member)))) (def: .public (next queue) (All (_ a) (-> (Queue a) (Queue a))) |