diff options
author | Eduardo Julian | 2021-09-12 15:39:55 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-12 15:39:55 -0400 |
commit | 2dbbaaec93a53f8dd0b96a0028b9cf125c9066cd (patch) | |
tree | 14bc8b5abe09b46ef005c3ff7cf132f1d98ddf0d /stdlib/source/test/lux/data/collection/tree/finger.lux | |
parent | dda05bca0956af5e5b3875c4cc36e61aa04772e4 (diff) |
Re-named \ => # && \\ => ##
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/data/collection/tree/finger.lux | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux index e00a0773b..5285a8eca 100644 --- a/stdlib/source/test/lux/data/collection/tree/finger.lux +++ b/stdlib/source/test/lux/data/collection/tree/finger.lux @@ -5,11 +5,11 @@ [abstract [monad {"+" [do]}]] [control - ["[0]" maybe ("[1]\[0]" functor)]] + ["[0]" maybe ("[1]#[0]" functor)]] [data - ["[0]" text ("[1]\[0]" equivalence monoid)] + ["[0]" text ("[1]#[0]" equivalence monoid)] [collection - ["[0]" list ("[1]\[0]" mix)]]] + ["[0]" list ("[1]#[0]" mix)]]] [math ["[0]" random] [number @@ -34,7 +34,7 @@ (_.for [/.Tree]) (do [! random.monad] [tag_left (random.ascii/alpha_num 1) - tag_right (random.only (|>> (text\= tag_left) not) + tag_right (random.only (|>> (text#= tag_left) not) (random.ascii/alpha_num 1)) expected_left random.nat expected_right random.nat] @@ -43,22 +43,22 @@ (exec (/.builder text.monoid) true)) (_.cover [/.tag] - (and (text\= tag_left - (/.tag (\ ..builder leaf tag_left expected_left))) - (text\= (text\composite tag_left tag_right) - (/.tag (\ ..builder branch - (\ ..builder leaf tag_left expected_left) - (\ ..builder leaf tag_right expected_right)))))) + (and (text#= tag_left + (/.tag (# ..builder leaf tag_left expected_left))) + (text#= (text#composite tag_left tag_right) + (/.tag (# ..builder branch + (# ..builder leaf tag_left expected_left) + (# ..builder leaf tag_right expected_right)))))) (_.cover [/.root] - (and (case (/.root (\ ..builder leaf tag_left expected_left)) + (and (case (/.root (# ..builder leaf tag_left expected_left)) {.#Left actual} (n.= expected_left actual) {.#Right _} false) - (case (/.root (\ ..builder branch - (\ ..builder leaf tag_left expected_left) - (\ ..builder leaf tag_right expected_right))) + (case (/.root (# ..builder branch + (# ..builder leaf tag_left expected_left) + (# ..builder leaf tag_right expected_right))) {.#Left _} false @@ -73,11 +73,11 @@ false)))) (_.cover [/.value] (and (n.= expected_left - (/.value (\ ..builder leaf tag_left expected_left))) + (/.value (# ..builder leaf tag_left expected_left))) (n.= expected_left - (/.value (\ ..builder branch - (\ ..builder leaf tag_left expected_left) - (\ ..builder leaf tag_right expected_right)))))) + (/.value (# ..builder branch + (# ..builder leaf tag_left expected_left) + (# ..builder leaf tag_right expected_right)))))) (do random.monad [.let [tags_equivalence (list.equivalence text.equivalence) values_equivalence (list.equivalence n.equivalence)] @@ -86,40 +86,40 @@ values/H random.nat values/T (random.list 5 random.nat)] (_.cover [/.tags /.values] - (let [tree (list\mix (function (_ [tag value] tree) - (\ builder branch tree (\ builder leaf tag value))) - (\ builder leaf tags/H values/H) + (let [tree (list#mix (function (_ [tag value] tree) + (# builder branch tree (# builder leaf tag value))) + (# builder leaf tags/H values/H) (list.zipped/2 tags/T values/T))] - (and (\ tags_equivalence = (list& tags/H tags/T) (/.tags tree)) - (\ values_equivalence = (list& values/H values/T) (/.values tree)))))) + (and (# tags_equivalence = (list& tags/H tags/T) (/.tags tree)) + (# values_equivalence = (list& values/H values/T) (/.values tree)))))) (_.cover [/.one] (let [can_find_correct_one! - (|> (\ ..builder leaf tag_left expected_left) + (|> (# ..builder leaf tag_left expected_left) (/.one (text.contains? tag_left)) - (maybe\each (n.= expected_left)) + (maybe#each (n.= expected_left)) (maybe.else false)) cannot_find_incorrect_one! - (|> (\ ..builder leaf tag_right expected_right) + (|> (# ..builder leaf tag_right expected_right) (/.one (text.contains? tag_left)) - (maybe\each (n.= expected_left)) + (maybe#each (n.= expected_left)) (maybe.else false) not) can_find_left! - (|> (\ ..builder branch - (\ ..builder leaf tag_left expected_left) - (\ ..builder leaf tag_right expected_right)) + (|> (# ..builder branch + (# ..builder leaf tag_left expected_left) + (# ..builder leaf tag_right expected_right)) (/.one (text.contains? tag_left)) - (maybe\each (n.= expected_left)) + (maybe#each (n.= expected_left)) (maybe.else false)) can_find_right! - (|> (\ ..builder branch - (\ ..builder leaf tag_left expected_left) - (\ ..builder leaf tag_right expected_right)) + (|> (# ..builder branch + (# ..builder leaf tag_left expected_left) + (# ..builder leaf tag_right expected_right)) (/.one (text.contains? tag_right)) - (maybe\each (n.= expected_right)) + (maybe#each (n.= expected_right)) (maybe.else false))] (and can_find_correct_one! cannot_find_incorrect_one! @@ -128,23 +128,23 @@ (_.cover [/.exists?] (let [can_find_correct_one! (/.exists? (text.contains? tag_left) - (\ ..builder leaf tag_left expected_left)) + (# ..builder leaf tag_left expected_left)) cannot_find_incorrect_one! (not (/.exists? (text.contains? tag_left) - (\ ..builder leaf tag_right expected_right))) + (# ..builder leaf tag_right expected_right))) can_find_left! (/.exists? (text.contains? tag_left) - (\ ..builder branch - (\ ..builder leaf tag_left expected_left) - (\ ..builder leaf tag_right expected_right))) + (# ..builder branch + (# ..builder leaf tag_left expected_left) + (# ..builder leaf tag_right expected_right))) can_find_right! (/.exists? (text.contains? tag_right) - (\ ..builder branch - (\ ..builder leaf tag_left expected_left) - (\ ..builder leaf tag_right expected_right)))] + (# ..builder branch + (# ..builder leaf tag_left expected_left) + (# ..builder leaf tag_right expected_right)))] (and can_find_correct_one! cannot_find_incorrect_one! can_find_left! |