aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-12-02 20:37:13 -0400
committerEduardo Julian2020-12-02 20:37:13 -0400
commit28c724857d76afdc40b5b036f415cc151eb66263 (patch)
tree3e970ca2a10dd7bb5c7ddd405349762945464d39 /stdlib/source/test/lux/data/collection/dictionary/ordered.lux
parent34e310622bdeb1d0588c0664c0e78cbaa84f837c (diff)
Replaced "contains?" function with "key?" function.
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/ordered.lux13
1 files changed, 6 insertions, 7 deletions
diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
index c34f3e3cf..01920fa1c 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -32,8 +32,7 @@
_
(do random.monad
[partial (dictionary order gen-key gen-value (dec size))
- key (random.filter (function (_ candidate)
- (not (/.contains? candidate partial)))
+ key (random.filter (|>> (/.key? partial) not)
gen-key)
value gen-value]
(wrap (/.put key value partial)))))
@@ -103,14 +102,14 @@
(|> sample
/.entries (/.from-list n.order)
(/\= sample)))
- (_.cover [/.contains?]
- (and (list.every? (function (_ key) (/.contains? key sample))
+ (_.cover [/.key?]
+ (and (list.every? (/.key? sample)
(/.keys sample))
- (not (/.contains? extra-key sample))))
+ (not (/.key? sample extra-key))))
(_.cover [/.put]
- (and (not (/.contains? extra-key sample))
+ (and (not (/.key? sample extra-key))
(let [sample+ (/.put extra-key extra-value sample)]
- (and (/.contains? extra-key sample+)
+ (and (/.key? sample+ extra-key)
(n.= (inc (/.size sample))
(/.size sample+))))))
(_.cover [/.get]