aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/build.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/stamp.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/time.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/version.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/time.lux4
-rw-r--r--stdlib/source/test/aedifex/artifact/time/date.lux4
-rw-r--r--stdlib/source/test/aedifex/artifact/time/time.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/versioning.lux4
-rw-r--r--stdlib/source/test/aedifex/cache.lux30
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux14
-rw-r--r--stdlib/source/test/aedifex/command/build.lux12
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux10
-rw-r--r--stdlib/source/test/aedifex/command/deploy.lux2
-rw-r--r--stdlib/source/test/aedifex/command/install.lux22
-rw-r--r--stdlib/source/test/aedifex/command/pom.lux6
-rw-r--r--stdlib/source/test/aedifex/dependency/deployment.lux42
-rw-r--r--stdlib/source/test/aedifex/hash.lux6
-rw-r--r--stdlib/source/test/aedifex/input.lux2
-rw-r--r--stdlib/source/test/aedifex/metadata/artifact.lux14
-rw-r--r--stdlib/source/test/aedifex/metadata/snapshot.lux14
-rw-r--r--stdlib/source/test/aedifex/package.lux4
-rw-r--r--stdlib/source/test/aedifex/parser.lux12
-rw-r--r--stdlib/source/test/aedifex/profile.lux6
-rw-r--r--stdlib/source/test/aedifex/project.lux12
-rw-r--r--stdlib/source/test/aedifex/repository/local.lux4
-rw-r--r--stdlib/source/test/aedifex/repository/remote.lux14
-rw-r--r--stdlib/source/test/aedifex/runtime.lux4
-rw-r--r--stdlib/source/test/lux.lux43
-rw-r--r--stdlib/source/test/lux/abstract/comonad/cofree.lux4
-rw-r--r--stdlib/source/test/lux/abstract/enum.lux6
-rw-r--r--stdlib/source/test/lux/abstract/functor.lux8
-rw-r--r--stdlib/source/test/lux/abstract/interval.lux48
-rw-r--r--stdlib/source/test/lux/abstract/mix.lux2
-rw-r--r--stdlib/source/test/lux/abstract/monad.lux10
-rw-r--r--stdlib/source/test/lux/abstract/monad/free.lux2
-rw-r--r--stdlib/source/test/lux/abstract/monoid.lux6
-rw-r--r--stdlib/source/test/lux/abstract/predicate.lux2
-rw-r--r--stdlib/source/test/lux/control/concurrency/actor.lux4
-rw-r--r--stdlib/source/test/lux/control/concurrency/async.lux2
-rw-r--r--stdlib/source/test/lux/control/concurrency/frp.lux10
-rw-r--r--stdlib/source/test/lux/control/concurrency/semaphore.lux24
-rw-r--r--stdlib/source/test/lux/control/concurrency/stm.lux4
-rw-r--r--stdlib/source/test/lux/control/concurrency/thread.lux2
-rw-r--r--stdlib/source/test/lux/control/exception.lux2
-rw-r--r--stdlib/source/test/lux/control/function.lux6
-rw-r--r--stdlib/source/test/lux/control/function/memo.lux4
-rw-r--r--stdlib/source/test/lux/control/function/mixin.lux4
-rw-r--r--stdlib/source/test/lux/control/function/mutual.lux4
-rw-r--r--stdlib/source/test/lux/control/lazy.lux2
-rw-r--r--stdlib/source/test/lux/control/maybe.lux2
-rw-r--r--stdlib/source/test/lux/control/parser.lux36
-rw-r--r--stdlib/source/test/lux/control/parser/analysis.lux2
-rw-r--r--stdlib/source/test/lux/control/parser/binary.lux32
-rw-r--r--stdlib/source/test/lux/control/parser/cli.lux2
-rw-r--r--stdlib/source/test/lux/control/parser/code.lux8
-rw-r--r--stdlib/source/test/lux/control/parser/environment.lux4
-rw-r--r--stdlib/source/test/lux/control/parser/json.lux24
-rw-r--r--stdlib/source/test/lux/control/parser/synthesis.lux20
-rw-r--r--stdlib/source/test/lux/control/parser/text.lux72
-rw-r--r--stdlib/source/test/lux/control/parser/type.lux6
-rw-r--r--stdlib/source/test/lux/control/parser/xml.lux6
-rw-r--r--stdlib/source/test/lux/control/region.lux18
-rw-r--r--stdlib/source/test/lux/control/remember.lux4
-rw-r--r--stdlib/source/test/lux/control/state.lux2
-rw-r--r--stdlib/source/test/lux/data/binary.lux10
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/bits.lux10
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary.lux12
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/ordered.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/plist.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux64
-rw-r--r--stdlib/source/test/lux/data/collection/queue.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/queue/priority.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/row.lux10
-rw-r--r--stdlib/source/test/lux/data/collection/sequence.lux10
-rw-r--r--stdlib/source/test/lux/data/collection/set.lux18
-rw-r--r--stdlib/source/test/lux/data/collection/set/multi.lux14
-rw-r--r--stdlib/source/test/lux/data/collection/set/ordered.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/stack.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/tree.lux12
-rw-r--r--stdlib/source/test/lux/data/collection/tree/finger.lux10
-rw-r--r--stdlib/source/test/lux/data/collection/tree/zipper.lux4
-rw-r--r--stdlib/source/test/lux/data/color.lux8
-rw-r--r--stdlib/source/test/lux/data/format/binary.lux2
-rw-r--r--stdlib/source/test/lux/data/format/json.lux14
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux16
-rw-r--r--stdlib/source/test/lux/data/format/xml.lux4
-rw-r--r--stdlib/source/test/lux/data/name.lux10
-rw-r--r--stdlib/source/test/lux/data/sum.lux16
-rw-r--r--stdlib/source/test/lux/data/text.lux30
-rw-r--r--stdlib/source/test/lux/data/text/buffer.lux2
-rw-r--r--stdlib/source/test/lux/data/text/encoding.lux2
-rw-r--r--stdlib/source/test/lux/data/text/escape.lux8
-rw-r--r--stdlib/source/test/lux/data/text/format.lux4
-rw-r--r--stdlib/source/test/lux/data/text/unicode/block.lux10
-rw-r--r--stdlib/source/test/lux/data/text/unicode/set.lux2
-rw-r--r--stdlib/source/test/lux/debug.lux16
-rw-r--r--stdlib/source/test/lux/documentation.lux2
-rw-r--r--stdlib/source/test/lux/extension.lux14
-rw-r--r--stdlib/source/test/lux/ffi.js.lux8
-rw-r--r--stdlib/source/test/lux/ffi.jvm.lux38
-rw-r--r--stdlib/source/test/lux/ffi.old.lux10
-rw-r--r--stdlib/source/test/lux/locale.lux12
-rw-r--r--stdlib/source/test/lux/locale/language.lux21
-rw-r--r--stdlib/source/test/lux/locale/territory.lux29
-rw-r--r--stdlib/source/test/lux/macro.lux14
-rw-r--r--stdlib/source/test/lux/macro/code.lux50
-rw-r--r--stdlib/source/test/lux/macro/syntax/annotations.lux2
-rw-r--r--stdlib/source/test/lux/macro/syntax/declaration.lux2
-rw-r--r--stdlib/source/test/lux/macro/syntax/export.lux12
-rw-r--r--stdlib/source/test/lux/macro/syntax/type/variable.lux2
-rw-r--r--stdlib/source/test/lux/math.lux24
-rw-r--r--stdlib/source/test/lux/math/logic/fuzzy.lux8
-rw-r--r--stdlib/source/test/lux/math/modular.lux6
-rw-r--r--stdlib/source/test/lux/math/modulus.lux2
-rw-r--r--stdlib/source/test/lux/math/number/complex.lux8
-rw-r--r--stdlib/source/test/lux/math/number/frac.lux14
-rw-r--r--stdlib/source/test/lux/math/number/i16.lux4
-rw-r--r--stdlib/source/test/lux/math/number/i32.lux4
-rw-r--r--stdlib/source/test/lux/math/number/i64.lux18
-rw-r--r--stdlib/source/test/lux/math/number/i8.lux4
-rw-r--r--stdlib/source/test/lux/math/number/int.lux10
-rw-r--r--stdlib/source/test/lux/math/number/nat.lux8
-rw-r--r--stdlib/source/test/lux/math/number/ratio.lux10
-rw-r--r--stdlib/source/test/lux/math/number/rev.lux18
-rw-r--r--stdlib/source/test/lux/meta.lux82
-rw-r--r--stdlib/source/test/lux/meta/annotation.lux9
-rw-r--r--stdlib/source/test/lux/target/jvm.lux73
-rw-r--r--stdlib/source/test/lux/test.lux6
-rw-r--r--stdlib/source/test/lux/time.lux16
-rw-r--r--stdlib/source/test/lux/time/date.lux10
-rw-r--r--stdlib/source/test/lux/time/day.lux2
-rw-r--r--stdlib/source/test/lux/time/duration.lux8
-rw-r--r--stdlib/source/test/lux/time/month.lux8
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux60
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux10
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux3
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux52
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux30
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux54
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux58
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux26
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux6
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux6
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux28
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux32
-rw-r--r--stdlib/source/test/lux/type.lux28
-rw-r--r--stdlib/source/test/lux/type/check.lux52
-rw-r--r--stdlib/source/test/lux/type/implicit.lux16
-rw-r--r--stdlib/source/test/lux/type/poly/equivalence.lux37
-rw-r--r--stdlib/source/test/lux/type/poly/json.lux45
-rw-r--r--stdlib/source/test/lux/type/quotient.lux2
-rw-r--r--stdlib/source/test/lux/type/refinement.lux24
-rw-r--r--stdlib/source/test/lux/type/resource.lux12
-rw-r--r--stdlib/source/test/lux/type/unit.lux22
-rw-r--r--stdlib/source/test/lux/world/file/watch.lux4
-rw-r--r--stdlib/source/test/lux/world/input/keyboard.lux2
-rw-r--r--stdlib/source/test/lux/world/net/http/client.lux2
-rw-r--r--stdlib/source/test/lux/world/output/video/resolution.lux2
-rw-r--r--stdlib/source/test/lux/world/program.lux4
162 files changed, 1122 insertions, 1108 deletions
diff --git a/stdlib/source/test/aedifex/artifact/snapshot.lux b/stdlib/source/test/aedifex/artifact/snapshot.lux
index c4ebdfc66..40fc5e137 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot.lux
@@ -40,7 +40,7 @@
/.format
list
(<xml>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false))))
$/build.test
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/build.lux b/stdlib/source/test/aedifex/artifact/snapshot/build.lux
index d207053c9..ab169fe29 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/build.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/build.lux
@@ -34,6 +34,6 @@
/.format
list
(<xml>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false))))
))))
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
index ed77767cb..e1903c937 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
@@ -41,6 +41,6 @@
(|> expected
/.format
(<xml>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false))))
)))
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/time.lux b/stdlib/source/test/aedifex/artifact/snapshot/time.lux
index 7f33a9e86..22436060e 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/time.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/time.lux
@@ -36,7 +36,7 @@
(|> expected
/.format
(<text>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false)))
))
)))
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version.lux b/stdlib/source/test/aedifex/artifact/snapshot/version.lux
index 3976d7054..f027e0e46 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/version.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/version.lux
@@ -43,7 +43,7 @@
/.format
list
(<xml>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false))))
/value.test
diff --git a/stdlib/source/test/aedifex/artifact/time.lux b/stdlib/source/test/aedifex/artifact/time.lux
index 8270969fd..c4f74df92 100644
--- a/stdlib/source/test/aedifex/artifact/time.lux
+++ b/stdlib/source/test/aedifex/artifact/time.lux
@@ -43,7 +43,7 @@
(|> expected
/.format
(<text>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false))))
(do random.monad
[expected ..random]
@@ -51,7 +51,7 @@
(|> expected
/.instant
/.of_instant
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false))))
(_.cover [/.epoch]
(instant\= instant.epoch (/.instant /.epoch)))
diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux
index c67ade3ec..15eb29aba 100644
--- a/stdlib/source/test/aedifex/artifact/time/date.lux
+++ b/stdlib/source/test/aedifex/artifact/time/date.lux
@@ -49,13 +49,13 @@
(|> expected
/.format
(<text>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false)))
(_.cover [/.value /.date]
(|> expected
/.value
/.date
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false)))
(_.cover [/.year_is_out_of_range]
(case (/.date candidate)
diff --git a/stdlib/source/test/aedifex/artifact/time/time.lux b/stdlib/source/test/aedifex/artifact/time/time.lux
index 1f5e4c6e7..7e8317b78 100644
--- a/stdlib/source/test/aedifex/artifact/time/time.lux
+++ b/stdlib/source/test/aedifex/artifact/time/time.lux
@@ -33,6 +33,6 @@
(|> expected
/.format
(<text>.result /.parser)
- (try\map (\ time.equivalence = expected))
+ (try\each (\ time.equivalence = expected))
(try.else false))))
)))
diff --git a/stdlib/source/test/aedifex/artifact/versioning.lux b/stdlib/source/test/aedifex/artifact/versioning.lux
index aa90619cb..95019139f 100644
--- a/stdlib/source/test/aedifex/artifact/versioning.lux
+++ b/stdlib/source/test/aedifex/artifact/versioning.lux
@@ -42,13 +42,13 @@
/.format
list
(<xml>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false))))
(_.cover [/.init]
(|> /.init
/.format
list
(<xml>.result /.parser)
- (try\map (\ /.equivalence = /.init))
+ (try\each (\ /.equivalence = /.init))
(try.else false)))
)))
diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux
index 91870d680..143766eb6 100644
--- a/stdlib/source/test/aedifex/cache.lux
+++ b/stdlib/source/test/aedifex/cache.lux
@@ -64,7 +64,7 @@
(def: content
(Random Binary)
(do {! random.monad}
- [content_size (\ ! map (n.% 100) random.nat)]
+ [content_size (\ ! each (n.% 100) random.nat)]
(_binary.random content_size)))
(def: package
@@ -82,20 +82,20 @@
(do {! random.monad}
[[main_dependency main_package] ..package
dependencies (|> (//package.dependencies main_package)
- (\ try.monad map set.list)
+ (\ try.monad each set.list)
(try.else (list))
- (monad.map ! (function (_ dependency)
- (do !
- [pom (random.one (function (_ [identity profile pom])
- (|> profile
- (with@ #//.dependencies (set.empty //dependency.hash))
- (with@ #//.identity (#.Some (value@ #//dependency.artifact dependency)))
- //pom.write
- try.maybe))
- ..profile)
- content ..content]
- (in [dependency
- (with@ #//package.origin (#//repository/origin.Remote "") (//package.local pom content))])))))]
+ (monad.each ! (function (_ dependency)
+ (do !
+ [pom (random.one (function (_ [identity profile pom])
+ (|> profile
+ (with@ #//.dependencies (set.empty //dependency.hash))
+ (with@ #//.identity (#.Some (value@ #//dependency.artifact dependency)))
+ //pom.write
+ try.maybe))
+ ..profile)
+ content ..content]
+ (in [dependency
+ (with@ #//package.origin (#//repository/origin.Remote "") (//package.local pom content))])))))]
(in (dictionary.of_list //dependency.hash (list& [main_dependency main_package] dependencies)))))
(def: singular
@@ -137,7 +137,7 @@
[_ wrote!
actual read!]
(in (\ //dependency/resolution.equivalence =
- (\ dictionary.functor map
+ (\ dictionary.functor each
(with@ #//package.origin (#//repository/origin.Local ""))
expected)
actual)))))))))
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index 1ed19ddf7..91506ca06 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -89,8 +89,8 @@
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
- expected_runs (\ ! map (|>> (n.% 10) (n.max 2)) random.nat)
- dummy_path (\ ! map (|>> (format source /)) (random.ascii/alpha 5))
+ expected_runs (\ ! each (|>> (n.% 10) (n.max 2)) random.nat)
+ dummy_path (\ ! each (|>> (format source /)) (random.ascii/alpha 5))
[compiler resolution] $build.resolution]
($_ _.and
(_.cover [/.delay]
@@ -110,15 +110,15 @@
fs
(shell.async ($build.good_shell []))
resolution)
- (\ ! map (|>> (case> (#try.Failure error)
- (same? end_signal error)
+ (\ ! each (|>> (case> (#try.Failure error)
+ (same? end_signal error)
- (#try.Success _)
- false))))
+ (#try.Success _)
+ false))))
correct_number_of_runs! (|> @runs
atom.read!
async.future
- (\ ! map (n.= expected_runs)))]
+ (\ ! each (n.= expected_runs)))]
(in (#try.Success (and correct_number_of_runs!
no_dangling_process!)))))]
(_.cover' [/.do!]
diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux
index 03625f0c1..ff5f7450b 100644
--- a/stdlib/source/test/aedifex/command/build.lux
+++ b/stdlib/source/test/aedifex/command/build.lux
@@ -232,12 +232,12 @@
actual/1 (\ console read_line [])
actual/2 (\ console read_line [])
end! (|> (\ console read_line [])
- (\ ! map (|>> (case> (#try.Failure error)
- true
-
- (#try.Success _)
- false)
- #try.Success)))]
+ (\ ! each (|>> (case> (#try.Failure error)
+ true
+
+ (#try.Success _)
+ false)
+ #try.Success)))]
(in (and (text\= expected/0 actual/0)
(text\= expected/1 actual/1)
(text\= expected/2 actual/2)
diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux
index 30ef6eb6f..59908a364 100644
--- a/stdlib/source/test/aedifex/command/clean.lux
+++ b/stdlib/source/test/aedifex/command/clean.lux
@@ -43,10 +43,10 @@
(def: (files prefix)
(-> Path (Random (List [Path Binary])))
(do {! random.monad}
- [count (\ ! map (n.% 10) random.nat)
+ [count (\ ! each (n.% 10) random.nat)
names (random.set text.hash count ..node_name)
contents (random.list count ($binary.random 100))]
- (in (list.zipped/2 (list\map (|>> (format prefix)) (set.list names))
+ (in (list.zipped/2 (list\each (|>> (format prefix)) (set.list names))
contents))))
(def: (create_file! fs [path content])
@@ -58,7 +58,7 @@
(do {! (try.with async.monad)}
[_ (: (Async (Try Any))
(file.make_directories async.monad fs path))
- _ (monad.map ! (..create_file! fs) files)]
+ _ (monad.each ! (..create_file! fs) files)]
(in [])))
(def: (directory_exists? fs)
@@ -75,8 +75,8 @@
[directory_exists? (..directory_exists? fs directory_path)
files_exist? (: (Action (List Bit))
(|> files
- (list\map product.left)
- (monad.map ///action.monad (..file_exists? fs))))]
+ (list\each product.left)
+ (monad.each ///action.monad (..file_exists? fs))))]
(in (and directory_exists?
(list.every? (|>>) files_exist?)))))
diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux
index 526227f2d..b36998b6f 100644
--- a/stdlib/source/test/aedifex/command/deploy.lux
+++ b/stdlib/source/test/aedifex/command/deploy.lux
@@ -84,7 +84,7 @@
(value@ #///.sources)
set.list
(export.library fs)
- (\ ! map (format.result tar.writer)))
+ (\ ! each (format.result tar.writer)))
actual_pom (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact ///artifact/extension.pom))
actual_library (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact ///artifact/extension.lux_library))
diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux
index f1c0c2de1..93d304d36 100644
--- a/stdlib/source/test/aedifex/command/install.lux
+++ b/stdlib/source/test/aedifex/command/install.lux
@@ -45,12 +45,12 @@
! ///action.monad]
(|> sources
set.list
- (monad.map ! (function (_ head)
- (do !
- [_ (: (Async (Try Any))
- (file.make_directories async.monad fs head))]
- (: (Async (Try Any))
- (file.make_file async.monad fs (binary.empty 0) (format head / head ".lux")))))))))
+ (monad.each ! (function (_ head)
+ (do !
+ [_ (: (Async (Try Any))
+ (file.make_directories async.monad fs head))]
+ (: (Async (Try Any))
+ (file.make_file async.monad fs (binary.empty 0) (format head / head ".lux")))))))))
(def: (execute! program fs sample)
(-> (Program Async) (file.System Async) ///.Profile (Async (Try Text)))
@@ -65,7 +65,7 @@
(<| (_.covering /._)
(do {! random.monad}
[identity $artifact.random
- sample (\ ! map (with@ #///.identity (#.Some identity))
+ sample (\ ! each (with@ #///.identity (#.Some identity))
$profile.random)
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
@@ -79,16 +79,16 @@
library_path (format artifact_path ///artifact/extension.lux_library)
pom_path (format artifact_path ///artifact/extension.pom)]
verdict (do {! ///action.monad}
- [succeeded! (\ ! map (text\= /.success)
+ [succeeded! (\ ! each (text\= /.success)
(..execute! program fs sample))
library_exists! (|> library_path
(format home /)
(\ fs file?)
- (\ async.monad map (|>> #try.Success)))
+ (\ async.monad each (|>> #try.Success)))
pom_exists! (|> pom_path
(format home /)
(\ fs file?)
- (\ async.monad map (|>> #try.Success)))]
+ (\ async.monad each (|>> #try.Success)))]
(in (and succeeded!
library_exists!
pom_exists!)))]
@@ -100,6 +100,6 @@
logging (..execute! program fs (with@ #///.identity #.None sample))]
(_.cover' [/.failure]
(|> logging
- (try\map (text\= /.failure))
+ (try\each (text\= /.failure))
(try.else false)))))
))))
diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux
index 7c2097a4d..211ce1ad5 100644
--- a/stdlib/source/test/aedifex/command/pom.lux
+++ b/stdlib/source/test/aedifex/command/pom.lux
@@ -44,12 +44,12 @@
(do !
[verdict (do ///action.monad
[expected (|> (///pom.write sample)
- (try\map (|>> (\ xml.codec encoded)
- (\ utf8.codec encoded)))
+ (try\each (|>> (\ xml.codec encoded)
+ (\ utf8.codec encoded)))
(\ ! in))
actual (\ fs read ///pom.file)
- logging! (\ ///action.monad map
+ logging! (\ ///action.monad each
(text\= /.success)
(\ console read_line []))
diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux
index 97fd9f1f4..cd92cec74 100644
--- a/stdlib/source/test/aedifex/dependency/deployment.lux
+++ b/stdlib/source/test/aedifex/dependency/deployment.lux
@@ -106,7 +106,7 @@
correct_library_upload!
(and (|> cache
(dictionary.value library_url)
- (maybe\map (binary\= expected_library))
+ (maybe\each (binary\= expected_library))
(maybe.else false))
(dictionary.key? cache (format library_url artifact/extension.sha-1))
(dictionary.key? cache (format library_url artifact/extension.md5)))
@@ -114,7 +114,7 @@
correct_pom_upload!
(and (|> cache
(dictionary.value pom_url)
- (maybe\map (binary\= expected_pom))
+ (maybe\each (binary\= expected_pom))
(maybe.else false))
(dictionary.key? cache (format pom_url artifact/extension.sha-1))
(dictionary.key? cache (format pom_url artifact/extension.md5)))
@@ -147,7 +147,7 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [address (\ ! map (text.suffix uri.separator)
+ [address (\ ! each (text.suffix uri.separator)
(random.ascii/upper 10))]
($_ _.and
(do {! random.monad}
@@ -161,16 +161,16 @@
cache (async.future (atom.read! cache))]
(_.cover' [/.one]
(|> ?outcome
- (try\map (verify_one 1 address package cache expected_artifact))
+ (try\each (verify_one 1 address package cache expected_artifact))
(try.else false))))))
(do {! random.monad}
[.let [hash (: (Hash [Dependency Artifact Package])
- (\ hash.functor map (|>> product.right product.left product.left)
+ (\ hash.functor each (|>> product.right product.left product.left)
text.hash))]
- num_bundles (\ ! map (n.% 10) random.nat)
+ num_bundles (\ ! each (n.% 10) random.nat)
bundles (|> ..bundle
(random.set hash num_bundles)
- (\ ! map set.list))
+ (\ ! each set.list))
.let [resolution (list\mix (function (_ [dependency expected_artifact package] resolution)
(dictionary.has dependency package resolution))
resolution.empty
@@ -184,21 +184,21 @@
cache (async.future (atom.read! cache))]
(_.cover' [/.all]
(|> ?outcome
- (try\map (function (_ actual_artifacts)
- (let [expected_deployments!
- (n.= num_bundles (set.size actual_artifacts))
+ (try\each (function (_ actual_artifacts)
+ (let [expected_deployments!
+ (n.= num_bundles (set.size actual_artifacts))
- every_deployment_was_correct!
- (list.every? (function (_ [dependency expected_artifact package])
- (let [deployed!
- (set.member? actual_artifacts expected_artifact)
+ every_deployment_was_correct!
+ (list.every? (function (_ [dependency expected_artifact package])
+ (let [deployed!
+ (set.member? actual_artifacts expected_artifact)
- deployed_correctly!
- (verify_one num_bundles address package cache expected_artifact expected_artifact)]
- (and deployed!
- deployed_correctly!)))
- bundles)]
- (and expected_deployments!
- every_deployment_was_correct!))))
+ deployed_correctly!
+ (verify_one num_bundles address package cache expected_artifact expected_artifact)]
+ (and deployed!
+ deployed_correctly!)))
+ bundles)]
+ (and expected_deployments!
+ every_deployment_was_correct!))))
(try.else false))))))
))))
diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux
index 5e267091d..e91b79e1f 100644
--- a/stdlib/source/test/aedifex/hash.lux
+++ b/stdlib/source/test/aedifex/hash.lux
@@ -30,8 +30,8 @@
(-> (-> Binary (/.Hash h))
(Random (/.Hash h))))
(do {! random.monad}
- [size (\ ! map (n.% 100) random.nat)]
- (\ ! map hash (_binary.random size))))
+ [size (\ ! each (n.% 100) random.nat)]
+ (\ ! each hash (_binary.random size))))
(def: .public test
Test
@@ -55,7 +55,7 @@
(#try.Failure error)
false)
- (case (<constructor> (\ binary.monoid compose
+ (case (<constructor> (\ binary.monoid composite
(/.data expected)
(/.data expected)))
(#try.Success actual)
diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux
index 675357e7e..993e67088 100644
--- a/stdlib/source/test/aedifex/input.lux
+++ b/stdlib/source/test/aedifex/input.lux
@@ -45,7 +45,7 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [expected (\ ! map (with@ #//.parents (list)) $profile.random)
+ [expected (\ ! each (with@ #//.parents (list)) $profile.random)
.let [fs (: (file.System Async)
(file.mock (\ file.default separator)))]]
(in (do async.monad
diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux
index 85aafa550..eb8b4aec1 100644
--- a/stdlib/source/test/aedifex/metadata/artifact.lux
+++ b/stdlib/source/test/aedifex/metadata/artifact.lux
@@ -48,12 +48,12 @@
(random.ascii/alpha 5)
(random.list 5 (random.ascii/alpha 5))
(do {! random.monad}
- [year (\ ! map (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
- month (\ ! map (|>> (n.% 12) (n.+ 1)) random.nat)
- day_of_month (\ ! map (|>> (n.% 28) (n.+ 1)) random.nat)
- hour (\ ! map (n.% 24) random.nat)
- minute (\ ! map (n.% 60) random.nat)
- second (\ ! map (n.% 60) random.nat)]
+ [year (\ ! each (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
+ month (\ ! each (|>> (n.% 12) (n.+ 1)) random.nat)
+ day_of_month (\ ! each (|>> (n.% 28) (n.+ 1)) random.nat)
+ hour (\ ! each (n.% 24) random.nat)
+ minute (\ ! each (n.% 60) random.nat)
+ second (\ ! each (n.% 60) random.nat)]
(in (try.trusted
(do try.monad
[year (year.year year)
@@ -89,7 +89,7 @@
/.format
list
(<xml>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false))))
(_.cover [/.uri]
(text\= (//.remote_project_uri artifact)
diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux
index 2c74296e0..5010053a5 100644
--- a/stdlib/source/test/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/test/aedifex/metadata/snapshot.lux
@@ -52,12 +52,12 @@
(def: random_instant
(Random Instant)
(do {! random.monad}
- [year (\ ! map (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
- month (\ ! map (|>> (n.% 12) (n.+ 1)) random.nat)
- day_of_month (\ ! map (|>> (n.% 28) (n.+ 1)) random.nat)
- hour (\ ! map (n.% 24) random.nat)
- minute (\ ! map (n.% 60) random.nat)
- second (\ ! map (n.% 60) random.nat)]
+ [year (\ ! each (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
+ month (\ ! each (|>> (n.% 12) (n.+ 1)) random.nat)
+ day_of_month (\ ! each (|>> (n.% 28) (n.+ 1)) random.nat)
+ hour (\ ! each (n.% 24) random.nat)
+ minute (\ ! each (n.% 60) random.nat)
+ second (\ ! each (n.% 60) random.nat)]
(in (try.trusted
(do try.monad
[year (year.year year)
@@ -101,7 +101,7 @@
/.format
list
(<xml>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false)))
(_.cover [/.uri]
(text\= (//.remote_artifact_uri artifact)
diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux
index 7e9cf1dd6..7b2ac3865 100644
--- a/stdlib/source/test/aedifex/package.lux
+++ b/stdlib/source/test/aedifex/package.lux
@@ -43,7 +43,7 @@
(def: .public random
(Random [//.Profile /.Package])
(do {! random.monad}
- [content_size (\ ! map (n.% 100) random.nat)
+ [content_size (\ ! each (n.% 100) random.nat)
content ($binary.random content_size)
[profile pom] (random.one (function (_ profile)
(try.maybe
@@ -61,7 +61,7 @@
[[profile package] ..random]
($_ _.and
(_.for [/.equivalence]
- ($equivalence.spec /.equivalence (\ ! map product.right ..random)))
+ ($equivalence.spec /.equivalence (\ ! each product.right ..random)))
(_.cover [/.local?]
(/.local? (with@ #/.origin (#//origin.Local "~/yolo") package)))
diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux
index 6f1516258..de27a0ee8 100644
--- a/stdlib/source/test/aedifex/parser.lux
+++ b/stdlib/source/test/aedifex/parser.lux
@@ -40,12 +40,12 @@
(def: (list_of random)
(All [a] (-> (Random a) (Random (List a))))
(do {! random.monad}
- [size (\ ! map (n.% 5) random.nat)]
+ [size (\ ! each (n.% 5) random.nat)]
(random.list size random)))
(def: (dictionary_of key_hash key_random value_random)
(All [k v] (-> (Hash k) (Random k) (Random v) (Random (Dictionary k v))))
- (\ random.functor map
+ (\ random.functor each
(dictionary.of_list key_hash)
(..list_of (random.and key_random value_random))))
@@ -104,10 +104,10 @@
(|> expected
..with_empty_profile
dictionary.entries
- (list\map (function (_ [name profile])
- [name (|> profile
- ..with_default_sources
- ..with_default_repository)]))
+ (list\each (function (_ [name profile])
+ [name (|> profile
+ ..with_default_sources
+ ..with_default_repository)]))
(dictionary.of_list text.hash)
(\ //project.equivalence = actual))
diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux
index 4cb58d0d0..92d755290 100644
--- a/stdlib/source/test/aedifex/profile.lux
+++ b/stdlib/source/test/aedifex/profile.lux
@@ -74,18 +74,18 @@
(def: (list_of random)
(All [a] (-> (Random a) (Random (List a))))
(do {! random.monad}
- [size (\ ! map (n.% 5) random.nat)]
+ [size (\ ! each (n.% 5) random.nat)]
(random.list size random)))
(def: (set_of hash random)
(All [a] (-> (Hash a) (Random a) (Random (Set a))))
- (\ random.functor map
+ (\ random.functor each
(set.of_list hash)
(..list_of random)))
(def: (dictionary_of key_hash key_random value_random)
(All [k v] (-> (Hash k) (Random k) (Random v) (Random (Dictionary k v))))
- (\ random.functor map
+ (\ random.functor each
(dictionary.of_list key_hash)
(..list_of (random.and key_random value_random))))
diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux
index 291935293..ebf37db81 100644
--- a/stdlib/source/test/aedifex/project.lux
+++ b/stdlib/source/test/aedifex/project.lux
@@ -27,7 +27,7 @@
(def: profile
(Random [//.Name //.Profile])
(|> @profile.random
- (random\map (with@ #//.parents (list)))
+ (random\each (with@ #//.parents (list)))
(random.and (random.ascii/alpha 1))))
(def: .public random
@@ -63,24 +63,24 @@
(not (text\= dummy_name name))
(not (text\= sub_name name))))
(random.ascii/alpha 1))
- .let [project ($_ (\ /.monoid compose)
+ .let [project ($_ (\ /.monoid composite)
(/.project super_name super_profile)
(/.project dummy_name dummy_profile)
(/.project sub_name (with@ #//.parents (list super_name) sub_profile)))
- circular ($_ (\ /.monoid compose)
+ circular ($_ (\ /.monoid composite)
(/.project super_name (with@ #//.parents (list sub_name) super_profile))
(/.project dummy_name dummy_profile)
(/.project sub_name (with@ #//.parents (list super_name) sub_profile)))]]
($_ _.and
(_.cover [/.profile]
(and (|> (/.profile super_name project)
- (try\map (\ //.equivalence = super_profile))
+ (try\each (\ //.equivalence = super_profile))
(try.else false))
(|> (/.profile dummy_name project)
- (try\map (\ //.equivalence = dummy_profile))
+ (try\each (\ //.equivalence = dummy_profile))
(try.else false))
(|> (/.profile sub_name project)
- (try\map (\ //.equivalence = (\ //.monoid compose sub_profile super_profile)))
+ (try\each (\ //.equivalence = (\ //.monoid composite sub_profile super_profile)))
(try.else false))))
(_.cover [/.unknown_profile]
(case (/.profile fake_name project)
diff --git a/stdlib/source/test/aedifex/repository/local.lux b/stdlib/source/test/aedifex/repository/local.lux
index ccc13752f..34ae887d7 100644
--- a/stdlib/source/test/aedifex/repository/local.lux
+++ b/stdlib/source/test/aedifex/repository/local.lux
@@ -35,7 +35,7 @@
repo (/.repository program fs)]
uri (random.ascii/lower 10)
- expected (\ ! map (\ utf8.codec encoded)
+ expected (\ ! each (\ utf8.codec encoded)
(random.ascii/lower 10))]
($_ _.and
(in (do async.monad
@@ -47,6 +47,6 @@
(#try.Success _) false
(#try.Failure _) true)
(|> actual
- (try\map (binary\= expected))
+ (try\each (binary\= expected))
(try.else false))))))
))))
diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux
index 96d62ef6f..3013d8889 100644
--- a/stdlib/source/test/aedifex/repository/remote.lux
+++ b/stdlib/source/test/aedifex/repository/remote.lux
@@ -48,7 +48,7 @@
#try.Success
(if (|> headers
(dictionary.value "User-Agent")
- (maybe\map (same? /.user_agent))
+ (maybe\each (same? /.user_agent))
(maybe.else false))
(case [method input]
[#@http.Get #.None]
@@ -59,7 +59,7 @@
[#@http.Put (#.Some input)]
(if (|> headers
(dictionary.value "Authorization")
- (maybe\map (text\= (//identity.basic_auth user password)))
+ (maybe\each (text\= (//identity.basic_auth user password)))
(maybe.else false))
[http/status.created
{#@http.headers (http.headers (list))
@@ -90,7 +90,7 @@
user (random.ascii/lower 10)
password (random.ascii/lower 10)
- content (\ ! map (\ utf8.codec encoded)
+ content (\ ! each (\ utf8.codec encoded)
(random.ascii/lower 10))]
($_ _.and
(_.cover [/.repository /.user_agent /.Address]
@@ -100,13 +100,13 @@
address)]
(and (|> (\ repo download uri)
io.run!
- (try\map (\ utf8.codec decoded))
- try\join
- (try\map (text\= (format address uri)))
+ (try\each (\ utf8.codec decoded))
+ try\conjoint
+ (try\each (text\= (format address uri)))
(try.else false))
(|> (\ repo upload uri content)
io.run!
- (try\map (function.constant true))
+ (try\each (function.constant true))
(try.else false)))))
(_.cover [/.upload_failure]
(let [repo (/.repository (..good_http user password)
diff --git a/stdlib/source/test/aedifex/runtime.lux b/stdlib/source/test/aedifex/runtime.lux
index 782b20204..d4f116242 100644
--- a/stdlib/source/test/aedifex/runtime.lux
+++ b/stdlib/source/test/aedifex/runtime.lux
@@ -44,7 +44,7 @@
(~~ (template [<command>]
[(_.cover [/.default_java /.default_js /.default_python /.default_lua /.default_ruby]
(let [listing (|> (list /.default_java /.default_js /.default_python /.default_lua /.default_ruby)
- (list\map (value@ #/.program)))
+ (list\each (value@ #/.program)))
unique (set.of_list text.hash listing)]
(n.= (list.size listing)
(set.size unique))))]
@@ -62,6 +62,6 @@
(|> runtime'
(value@ #/.parameters)
list.last
- (maybe\map (text\= path))
+ (maybe\each (text\= path))
(maybe.else false)))))
)))))
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index 68f155559..a072fbc25 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -464,13 +464,15 @@
))))))
(/.type: for_type/variant
- #Case/0
- (#Case/1 Nat)
- (#Case/2 Int Text))
+ (Variant
+ #Case/0
+ (#Case/1 Nat)
+ (#Case/2 Int Text)))
(/.type: for_type/record
- {#slot/0 Bit
- #slot/1 Rev})
+ (Record
+ {#slot/0 Bit
+ #slot/1 Rev}))
(/.type: (for_type/all parameter)
[parameter parameter])
@@ -483,7 +485,7 @@
expected_left random.nat
expected_right random.nat
- .let [existential_type (\ ! map (|>> #.Ex) random.nat)]
+ .let [existential_type (\ ! each (|>> #.Ex) random.nat)]
expected/0 existential_type
expected/1 existential_type]
(<| (_.for [/.Type])
@@ -620,7 +622,7 @@
(n.= (n.+ left right)
(!n/+ left right))))
(do {! random.monad}
- [sample (\ ! map (n.% 5) random.nat)]
+ [sample (\ ! each (n.% 5) random.nat)]
(_.cover [/.^template]
(case sample
(/.^template [<case>]
@@ -653,12 +655,14 @@
)))
(type: Small
- {#small_left Nat
- #small_right Text})
+ (Record
+ {#small_left Nat
+ #small_right Text}))
(type: Big
- {#big_left Nat
- #big_right Small})
+ (Record
+ {#big_left Nat
+ #big_right Small}))
(def: for_slot
Test
@@ -886,8 +890,9 @@
)))
(type: (Pair l r)
- {#left l
- #right r})
+ (Record
+ {#left l
+ #right r}))
(template: (!pair <left> <right>)
[{#left <left>
@@ -896,8 +901,8 @@
(def: for_case
Test
(do {! random.monad}
- [expected_nat (\ ! map (n.% 1) random.nat)
- expected_int (\ ! map (i.% +1) random.int)
+ [expected_nat (\ ! each (n.% 1) random.nat)
+ expected_int (\ ! each (i.% +1) random.int)
expected_rev (random.either (in .5)
(in .25))
expected_frac (random.either (in +0.5)
@@ -1003,8 +1008,8 @@
Test
($_ _.and
(do random.monad
- [factor (random\map (|>> (n.% 10) (n.max 1)) random.nat)
- iterations (random\map (n.% 10) random.nat)
+ [factor (random\each (|>> (n.% 10) (n.max 1)) random.nat)
+ iterations (random\each (n.% 10) random.nat)
.let [expected (n.* factor iterations)]]
(_.cover [/.loop]
(n.= expected
@@ -1112,7 +1117,7 @@
let/3))
actual_locals/2 (|> locals/2
(value@ #.mappings)
- (list\map product.left)
+ (list\each product.left)
(set.of_list text.hash))
correct_locals!
@@ -1134,7 +1139,7 @@
(|> captured/2
(value@ #.mappings)
(plist.value name)
- (maybe\map (|>> product.right is?))
+ (maybe\each (|>> product.right is?))
(maybe.else false))))
correct_closure!
diff --git a/stdlib/source/test/lux/abstract/comonad/cofree.lux b/stdlib/source/test/lux/abstract/comonad/cofree.lux
index 916d1953b..971088981 100644
--- a/stdlib/source/test/lux/abstract/comonad/cofree.lux
+++ b/stdlib/source/test/lux/abstract/comonad/cofree.lux
@@ -21,12 +21,12 @@
(def: (injection value)
(Injection (/.CoFree Sequence))
- [value (sequence\map injection (sequence.repeated value))])
+ [value (sequence\each injection (sequence.repeated value))])
(def: (interpret [head tail])
(All [a] (-> (/.CoFree Sequence a) (Sequence a)))
(|> tail
- (sequence\map (\ (/.comonad sequence.functor) out))
+ (sequence\each (\ (/.comonad sequence.functor) out))
[head]
//.pending))
diff --git a/stdlib/source/test/lux/abstract/enum.lux b/stdlib/source/test/lux/abstract/enum.lux
index 33dff9472..afb40be03 100644
--- a/stdlib/source/test/lux/abstract/enum.lux
+++ b/stdlib/source/test/lux/abstract/enum.lux
@@ -20,7 +20,7 @@
(def: .public test
Test
(let [limit (: (Random Nat)
- (\ random.monad map (n.% 20) random.nat))]
+ (\ random.monad each (n.% 20) random.nat))]
(do random.monad
[start limit
end limit
@@ -32,8 +32,8 @@
($_ _.and
(_.cover [/.range]
(let [expected_size (|> end (n.- start) ++)
- expected_start? (|> range list.head (maybe\map (n.= start)) (maybe.else false))
- expected_end? (|> range list.last (maybe\map (n.= end)) (maybe.else false))
+ expected_start? (|> range list.head (maybe\each (n.= start)) (maybe.else false))
+ expected_end? (|> range list.last (maybe\each (n.= end)) (maybe.else false))
can_be_backwards? (\ (list.equivalence n.equivalence) =
(/.range n.enum start end)
(list.reversed (/.range n.enum end start)))
diff --git a/stdlib/source/test/lux/abstract/functor.lux b/stdlib/source/test/lux/abstract/functor.lux
index 522707615..c2d48f298 100644
--- a/stdlib/source/test/lux/abstract/functor.lux
+++ b/stdlib/source/test/lux/abstract/functor.lux
@@ -25,7 +25,7 @@
(<| (_.covering /._)
($_ _.and
(_.cover [/.Or /.sum]
- (and (case (\ (/.sum maybe.functor list.functor) map
+ (and (case (\ (/.sum maybe.functor list.functor) each
(n.+ shift)
(#.Left (#.Some left)))
(#.Left (#.Some actual))
@@ -33,7 +33,7 @@
_
false)
- (case (\ (/.sum maybe.functor list.functor) map
+ (case (\ (/.sum maybe.functor list.functor) each
(n.+ shift)
(#.Right (list right)))
(^ (#.Right (list actual)))
@@ -42,7 +42,7 @@
_
false)))
(_.cover [/.And /.product]
- (case (\ (/.product maybe.functor list.functor) map
+ (case (\ (/.product maybe.functor list.functor) each
(n.+ shift)
[(#.Some left) (list right)])
(^ [(#.Some actualL) (list actualR)])
@@ -52,7 +52,7 @@
_
false))
(_.cover [/.Then /.composite]
- (case (\ (/.composite maybe.functor list.functor) map
+ (case (\ (/.composite maybe.functor list.functor) each
(n.+ shift)
(#.Some (list left)))
(^ (#.Some (list actual)))
diff --git a/stdlib/source/test/lux/abstract/interval.lux b/stdlib/source/test/lux/abstract/interval.lux
index 76b45ddce..6be3c331b 100644
--- a/stdlib/source/test/lux/abstract/interval.lux
+++ b/stdlib/source/test/lux/abstract/interval.lux
@@ -139,13 +139,13 @@
Test
(do {! random.monad}
[[l m r] (|> (random.set n.hash 3 random.nat)
- (\ ! map (|>> set.list
- (list.sorted n.<)
- (case> (^ (list b t1 t2))
- [b t1 t2]
+ (\ ! each (|>> set.list
+ (list.sorted n.<)
+ (case> (^ (list b t1 t2))
+ [b t1 t2]
- _
- (undefined)))))
+ _
+ (undefined)))))
.let [left (/.singleton n.enum l)
right (/.singleton n.enum r)]]
($_ _.and
@@ -161,13 +161,13 @@
Test
(do {! random.monad}
[[b t1 t2] (|> (random.set n.hash 3 random.nat)
- (\ ! map (|>> set.list
- (list.sorted n.<)
- (case> (^ (list b t1 t2))
- [b t1 t2]
+ (\ ! each (|>> set.list
+ (list.sorted n.<)
+ (case> (^ (list b t1 t2))
+ [b t1 t2]
- _
- (undefined)))))
+ _
+ (undefined)))))
.let [int_left (/.between n.enum t1 t2)
int_right (/.between n.enum b t1)]]
($_ _.and
@@ -188,13 +188,13 @@
(do {! random.monad}
[some_interval ..interval
[x0 x1 x2 x3] (|> (random.set n.hash 4 random.nat)
- (\ ! map (|>> set.list
- (list.sorted n.<)
- (case> (^ (list x0 x1 x2 x3))
- [x0 x1 x2 x3]
+ (\ ! each (|>> set.list
+ (list.sorted n.<)
+ (case> (^ (list x0 x1 x2 x3))
+ [x0 x1 x2 x3]
- _
- (undefined)))))]
+ _
+ (undefined)))))]
($_ _.and
(_.test "Every interval is nested into itself."
(/.nested? some_interval some_interval))
@@ -221,13 +221,13 @@
(do {! random.monad}
[some_interval ..interval
[x0 x1 x2 x3] (|> (random.set n.hash 4 random.nat)
- (\ ! map (|>> set.list
- (list.sorted n.<)
- (case> (^ (list x0 x1 x2 x3))
- [x0 x1 x2 x3]
+ (\ ! each (|>> set.list
+ (list.sorted n.<)
+ (case> (^ (list x0 x1 x2 x3))
+ [x0 x1 x2 x3]
- _
- (undefined)))))]
+ _
+ (undefined)))))]
($_ _.and
(_.test "No interval overlaps with itself."
(not (/.overlaps? some_interval some_interval)))
diff --git a/stdlib/source/test/lux/abstract/mix.lux b/stdlib/source/test/lux/abstract/mix.lux
index 5aac1fd2b..a93f24cc9 100644
--- a/stdlib/source/test/lux/abstract/mix.lux
+++ b/stdlib/source/test/lux/abstract/mix.lux
@@ -21,6 +21,6 @@
(<| (_.covering /._)
($_ _.and
(_.cover [/.with_monoid]
- (n.= (\ list.mix mix (\ n.addition compose) (\ n.addition identity) samples)
+ (n.= (\ list.mix mix (\ n.addition composite) (\ n.addition identity) samples)
(/.with_monoid n.addition list.mix samples)))
))))
diff --git a/stdlib/source/test/lux/abstract/monad.lux b/stdlib/source/test/lux/abstract/monad.lux
index 5ede269ef..db0829989 100644
--- a/stdlib/source/test/lux/abstract/monad.lux
+++ b/stdlib/source/test/lux/abstract/monad.lux
@@ -34,17 +34,17 @@
(\ identity.monad in mono)))))
(_.cover [/.all]
(\ (list.equivalence n.equivalence) =
- (list\map ++ poly)
+ (list\each ++ poly)
(|> poly
- (list\map (|>> ++ (\ identity.monad in)))
+ (list\each (|>> ++ (\ identity.monad in)))
(: (List (Identity Nat)))
(/.all identity.monad)
(: (Identity (List Nat))))))
- (_.cover [/.map]
+ (_.cover [/.each]
(\ (list.equivalence n.equivalence) =
- (list\map ++ poly)
+ (list\each ++ poly)
(|> poly
- (/.map identity.monad (|>> ++ (\ identity.monad in)))
+ (/.each identity.monad (|>> ++ (\ identity.monad in)))
(: (Identity (List Nat))))))
(_.cover [/.only]
(\ (list.equivalence n.equivalence) =
diff --git a/stdlib/source/test/lux/abstract/monad/free.lux b/stdlib/source/test/lux/abstract/monad/free.lux
index 523741df6..8df494aac 100644
--- a/stdlib/source/test/lux/abstract/monad/free.lux
+++ b/stdlib/source/test/lux/abstract/monad/free.lux
@@ -30,7 +30,7 @@
(#/.Effect effect)
(|> effect
- (list\map interpret)
+ (list\each interpret)
list.together)))
(def: comparison
diff --git a/stdlib/source/test/lux/abstract/monoid.lux b/stdlib/source/test/lux/abstract/monoid.lux
index c78d2d8f6..95d932e81 100644
--- a/stdlib/source/test/lux/abstract/monoid.lux
+++ b/stdlib/source/test/lux/abstract/monoid.lux
@@ -24,10 +24,10 @@
(<| (_.covering /._)
($_ _.and
(_.cover [/.and]
- (let [[natLR intLR] (\ (/.and nat.addition int.multiplication) compose
+ (let [[natLR intLR] (\ (/.and nat.addition int.multiplication) composite
[natL intL] [natR intR])]
- (and (nat.= (\ nat.addition compose natL natR)
+ (and (nat.= (\ nat.addition composite natL natR)
natLR)
- (int.= (\ int.multiplication compose intL intR)
+ (int.= (\ int.multiplication composite intL intR)
intLR))))
))))
diff --git a/stdlib/source/test/lux/abstract/predicate.lux b/stdlib/source/test/lux/abstract/predicate.lux
index b3521ca3c..098136df4 100644
--- a/stdlib/source/test/lux/abstract/predicate.lux
+++ b/stdlib/source/test/lux/abstract/predicate.lux
@@ -46,7 +46,7 @@
(let [generator (: (Random (/.Predicate Nat))
(|> random.nat
(random.only (|>> (n.= 0) not))
- (\ ! map multiple?)))]
+ (\ ! each multiple?)))]
($_ _.and
(_.for [/.union]
($monoid.spec equivalence /.union generator))
diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux
index 93c68faff..c5c66d2fc 100644
--- a/stdlib/source/test/lux/control/concurrency/actor.lux
+++ b/stdlib/source/test/lux/control/concurrency/actor.lux
@@ -200,9 +200,9 @@
verdict)))
(do !
- [num_events (\ ! map (|>> (n.% 10) ++) random.nat)
+ [num_events (\ ! each (|>> (n.% 10) ++) random.nat)
events (random.list num_events random.nat)
- num_observations (\ ! map (n.% num_events) random.nat)
+ num_observations (\ ! each (n.% num_events) random.nat)
.let [expected (list.first num_observations events)
sink (: (Atom (Row Nat))
(atom.atom row.empty))]]
diff --git a/stdlib/source/test/lux/control/concurrency/async.lux b/stdlib/source/test/lux/control/concurrency/async.lux
index f9b917ee5..c6a858a5d 100644
--- a/stdlib/source/test/lux/control/concurrency/async.lux
+++ b/stdlib/source/test/lux/control/concurrency/async.lux
@@ -54,7 +54,7 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [waiting_time (|> random.nat (\ ! map (|>> (n.% ..delay) (n.+ ..delay))))
+ [waiting_time (|> random.nat (\ ! each (|>> (n.% ..delay) (n.+ ..delay))))
expected random.nat
dummy random.nat
.let [not_dummy (|> random.nat (random.only (|>> (n.= dummy) not)))]
diff --git a/stdlib/source/test/lux/control/concurrency/frp.lux b/stdlib/source/test/lux/control/concurrency/frp.lux
index 174c8adc7..ad508df7b 100644
--- a/stdlib/source/test/lux/control/concurrency/frp.lux
+++ b/stdlib/source/test/lux/control/concurrency/frp.lux
@@ -59,7 +59,7 @@
(in #.End)
(#.Some [head tail])
- (\ ! map (|>> (#.Item head))
+ (\ ! each (|>> (#.Item head))
(take_amount (-- amount_of_polls) [channel sink]))))))
(def: .public test
@@ -152,12 +152,12 @@
(do !
[_ (!signal [])]
(in #.None)))))
- (/.sequential 0 (list\compose inputs inputs))))
+ (/.sequential 0 (list\composite inputs inputs))))
_ ?signal
listened (|> sink
atom.read!
async.future
- (\ ! map row.list))]
+ (\ ! each row.list))]
(_.cover' [/.Subscriber /.subscribe!]
(list\= inputs listened))))
(in (do async.monad
@@ -189,8 +189,8 @@
(list\= (list distint/0 distint/1 distint/2)
actual))))
(do !
- [polling_delay (\ ! map (|>> (n.% 10) ++) random.nat)
- amount_of_polls (\ ! map (|>> (n.% 10) ++) random.nat)]
+ [polling_delay (\ ! each (|>> (n.% 10) ++) random.nat)
+ amount_of_polls (\ ! each (|>> (n.% 10) ++) random.nat)]
($_ _.and
(in (do {! async.monad}
[actual (..take_amount amount_of_polls (/.poll polling_delay (: (IO Nat) (io.io sample))))
diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux
index b4b07bbb0..796a1604e 100644
--- a/stdlib/source/test/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux
@@ -39,7 +39,7 @@
(_.for [/.Semaphore]
($_ _.and
(do {! random.monad}
- [initial_open_positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1))))
+ [initial_open_positions (|> random.nat (\ ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do async.monad
[result (async.within ..delay (/.wait! semaphore))]
@@ -51,10 +51,10 @@
#.None
false)))))
(do {! random.monad}
- [initial_open_positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1))))
+ [initial_open_positions (|> random.nat (\ ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do {! async.monad}
- [_ (monad.map ! /.wait! (list.repeated initial_open_positions semaphore))
+ [_ (monad.each ! /.wait! (list.repeated initial_open_positions semaphore))
result (async.within ..delay (/.wait! semaphore))]
(_.cover' [/.wait!]
(case result
@@ -64,10 +64,10 @@
#.None
true)))))
(do {! random.monad}
- [initial_open_positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1))))
+ [initial_open_positions (|> random.nat (\ ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do {! async.monad}
- [_ (monad.map ! /.wait! (list.repeated initial_open_positions semaphore))
+ [_ (monad.each ! /.wait! (list.repeated initial_open_positions semaphore))
.let [block (/.wait! semaphore)]
result/0 (async.within ..delay block)
open_positions (/.signal! semaphore)
@@ -80,7 +80,7 @@
_
false)))))
(do {! random.monad}
- [initial_open_positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1))))
+ [initial_open_positions (|> random.nat (\ ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do async.monad
[outcome (/.signal! semaphore)]
@@ -98,7 +98,7 @@
(_.for [/.Mutex]
($_ _.and
(do {! random.monad}
- [repetitions (|> random.nat (\ ! map (|>> (n.% 100) (n.max 10))))
+ [repetitions (|> random.nat (\ ! each (|>> (n.% 100) (n.max 10))))
.let [resource (atom.atom "")
expected_As (text.together (list.repeated repetitions "A"))
expected_Bs (text.together (list.repeated repetitions "B"))
@@ -155,7 +155,7 @@
_
false)))
(do {! random.monad}
- [limit (\ ! map (|>> (n.% 9) ++) random.nat)
+ [limit (\ ! each (|>> (n.% 9) ++) random.nat)
.let [barrier (/.barrier (maybe.trusted (/.limit limit)))
resource (atom.atom "")]]
(in (do {! async.monad}
@@ -165,10 +165,10 @@
text.together)
expected_ids (enum.range n.enum 0 (-- limit))]
_ (|> expected_ids
- (list\map (function (_ id)
- (exec
- (io.run! (atom.update! (|>> (format suffix)) resource))
- (waiter resource barrier id))))
+ (list\each (function (_ id)
+ (exec
+ (io.run! (atom.update! (|>> (format suffix)) resource))
+ (waiter resource barrier id))))
(monad.all !))
.let [outcome (io.run! (atom.read! resource))]]
(_.cover' [/.barrier /.block!]
diff --git a/stdlib/source/test/lux/control/concurrency/stm.lux b/stdlib/source/test/lux/control/concurrency/stm.lux
index f3a5c618c..8d56cbed2 100644
--- a/stdlib/source/test/lux/control/concurrency/stm.lux
+++ b/stdlib/source/test/lux/control/concurrency/stm.lux
@@ -41,7 +41,7 @@
(do {! random.monad}
[dummy random.nat
expected random.nat
- iterations_per_process (|> random.nat (\ ! map (n.% 100)))]
+ iterations_per_process (|> random.nat (\ ! each (n.% 100)))]
($_ _.and
(_.for [/.functor]
($functor.spec ..injection ..comparison /.functor))
@@ -94,7 +94,7 @@
(in (let [var (/.var 0)]
(do {! async.monad}
[_ (|> (list.repeated iterations_per_process [])
- (list\map (function (_ _) (/.commit! (/.update ++ var))))
+ (list\each (function (_ _) (/.commit! (/.update ++ var))))
(monad.all !))
cummulative (/.commit! (/.read var))]
(_.cover' [/.STM]
diff --git a/stdlib/source/test/lux/control/concurrency/thread.lux b/stdlib/source/test/lux/control/concurrency/thread.lux
index bee49206d..42c4c2d9f 100644
--- a/stdlib/source/test/lux/control/concurrency/thread.lux
+++ b/stdlib/source/test/lux/control/concurrency/thread.lux
@@ -26,7 +26,7 @@
(do {! random.monad}
[dummy random.nat
expected random.nat
- delay (\ ! map (|>> (n.% 5) (n.+ 5))
+ delay (\ ! each (|>> (n.% 5) (n.+ 5))
random.nat)]
($_ _.and
(_.cover [/.parallelism]
diff --git a/stdlib/source/test/lux/control/exception.lux b/stdlib/source/test/lux/control/exception.lux
index 74e73f45b..aacd0ab5a 100644
--- a/stdlib/source/test/lux/control/exception.lux
+++ b/stdlib/source/test/lux/control/exception.lux
@@ -29,7 +29,7 @@
[expected random.nat
wrong (|> random.nat (random.only (|>> (n.= expected) not)))
assertion_succeeded? random.bit
- .let [report_element (\ ! map %.nat random.nat)]
+ .let [report_element (\ ! each %.nat random.nat)]
field0 report_element
value0 report_element
field1 report_element
diff --git a/stdlib/source/test/lux/control/function.lux b/stdlib/source/test/lux/control/function.lux
index 4450991ec..714d33949 100644
--- a/stdlib/source/test/lux/control/function.lux
+++ b/stdlib/source/test/lux/control/function.lux
@@ -25,8 +25,8 @@
Test
(do {! random.monad}
[expected random.nat
- f0 (\ ! map n.+ random.nat)
- f1 (\ ! map n.* random.nat)
+ f0 (\ ! each n.+ random.nat)
+ f1 (\ ! each n.* random.nat)
dummy random.nat
extra (|> random.nat (random.only (|>> (n.= expected) not)))]
(<| (_.covering /._)
@@ -37,7 +37,7 @@
(n.= (left extra)
(right extra)))))
generator (: (Random (-> Nat Nat))
- (\ ! map n.- random.nat))]
+ (\ ! each n.- random.nat))]
(_.for [/.monoid]
($monoid.spec equivalence /.monoid generator)))
diff --git a/stdlib/source/test/lux/control/function/memo.lux b/stdlib/source/test/lux/control/function/memo.lux
index 3941998fc..ca4d06e2d 100644
--- a/stdlib/source/test/lux/control/function/memo.lux
+++ b/stdlib/source/test/lux/control/function/memo.lux
@@ -58,7 +58,7 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [input (|> random.nat (\ ! map (|>> (n.% 5) (n.+ 21))))])
+ [input (|> random.nat (\ ! each (|>> (n.% 5) (n.+ 21))))])
(_.for [/.Memo])
($_ _.and
(_.cover [/.closed /.none]
@@ -111,7 +111,7 @@
[output' (recur (-- input))]
(in (n.* input output')))))))
expected (|> (list.indices input)
- (list\map ++)
+ (list\each ++)
(list\mix n.* 1))
actual (|> (memo input)
(state.result (dictionary.empty n.hash))
diff --git a/stdlib/source/test/lux/control/function/mixin.lux b/stdlib/source/test/lux/control/function/mixin.lux
index 001626888..533f88072 100644
--- a/stdlib/source/test/lux/control/function/mixin.lux
+++ b/stdlib/source/test/lux/control/function/mixin.lux
@@ -25,7 +25,7 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [input (|> random.nat (\ ! map (|>> (n.% 6) (n.+ 20))))
+ [input (|> random.nat (\ ! each (|>> (n.% 6) (n.+ 20))))
dummy random.nat
shift (|> random.nat (random.only (|>> (n.= dummy) not)))
.let [equivalence (: (Equivalence (/.Mixin Nat Nat))
@@ -39,7 +39,7 @@
(in (function (_ delegate recur input)
output))))
expected (|> (list.indices input)
- (list\map ++)
+ (list\each ++)
(list\mix n.* 1))]])
($_ _.and
(_.for [/.Mixin]
diff --git a/stdlib/source/test/lux/control/function/mutual.lux b/stdlib/source/test/lux/control/function/mutual.lux
index 4fe2e4219..2e24285ef 100644
--- a/stdlib/source/test/lux/control/function/mutual.lux
+++ b/stdlib/source/test/lux/control/function/mutual.lux
@@ -18,7 +18,7 @@
(def: test_let
Test
(do {! random.monad}
- [sample (\ ! map (n.% 10) random.nat)
+ [sample (\ ! each (n.% 10) random.nat)
.let [expected (n.even? sample)]]
(<| (_.cover [/.let])
(/.let [(even? number)
@@ -51,7 +51,7 @@
(def: test_def
Test
(do {! random.monad}
- [sample (\ ! map (n.% 10) random.nat)
+ [sample (\ ! each (n.% 10) random.nat)
.let [expected (n.even? sample)]]
(<| (_.cover [/.def:])
(and (bit\= expected (..even? sample))
diff --git a/stdlib/source/test/lux/control/lazy.lux b/stdlib/source/test/lux/control/lazy.lux
index ea1b1f787..bc1ed13d0 100644
--- a/stdlib/source/test/lux/control/lazy.lux
+++ b/stdlib/source/test/lux/control/lazy.lux
@@ -29,7 +29,7 @@
(def: .public lazy
(All [a] (-> (Random a) (Random (Lazy a))))
- (\ random.functor map (|>> /.lazy)))
+ (\ random.functor each (|>> /.lazy)))
(def: .public test
Test
diff --git a/stdlib/source/test/lux/control/maybe.lux b/stdlib/source/test/lux/control/maybe.lux
index 6f4213268..291d61adf 100644
--- a/stdlib/source/test/lux/control/maybe.lux
+++ b/stdlib/source/test/lux/control/maybe.lux
@@ -34,7 +34,7 @@
($equivalence.spec (/.equivalence n.equivalence) (random.maybe random.nat)))
(_.for [/.hash]
(|> random.nat
- (\ random.monad map (|>> #.Some))
+ (\ random.monad each (|>> #.Some))
($hash.spec (/.hash n.hash))))
(_.for [/.monoid]
($monoid.spec (/.equivalence n.equivalence) /.monoid (random.maybe random.nat)))
diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux
index e37a2f355..fd29bd07b 100644
--- a/stdlib/source/test/lux/control/parser.lux
+++ b/stdlib/source/test/lux/control/parser.lux
@@ -90,7 +90,7 @@
Test
(do {! random.monad}
[expected0 random.nat
- variadic (\ ! map (|>> (n.max 1) (n.min 20)) random.nat)
+ variadic (\ ! each (|>> (n.max 1) (n.min 20)) random.nat)
expected+ (random.list variadic random.nat)
even0 (random.only n.even? random.nat)
odd0 (random.only n.odd? random.nat)
@@ -106,16 +106,16 @@
(match #.None
#1))))
(_.cover [/.some]
- (and (|> (list\map code.nat expected+)
+ (and (|> (list\each code.nat expected+)
(/.result (/.some <code>.nat))
(match actual
(\ (list.equivalence n.equivalence) = expected+ actual)))
- (|> (list\map (|>> .int code.int) expected+)
+ (|> (list\each (|>> .int code.int) expected+)
(/.result (/.some <code>.nat))
(match #.End
#1))))
(_.cover [/.many]
- (and (|> (list\map code.nat expected+)
+ (and (|> (list\each code.nat expected+)
(/.result (/.many <code>.nat))
(match actual
(\ (list.equivalence n.equivalence) = expected+ actual)))
@@ -123,7 +123,7 @@
(/.result (/.many <code>.nat))
(match (list actual)
(n.= expected0 actual)))
- (|> (list\map (|>> .int code.int) expected+)
+ (|> (list\each (|>> .int code.int) expected+)
(/.result (/.many <code>.nat))
fails?)))
(_.cover [/.only]
@@ -180,72 +180,72 @@
(def: combinators_1
Test
(do {! random.monad}
- [variadic (\ ! map (|>> (n.max 1) (n.min 20)) random.nat)
- times (\ ! map (n.% variadic) random.nat)
+ [variadic (\ ! each (|>> (n.max 1) (n.min 20)) random.nat)
+ times (\ ! each (n.% variadic) random.nat)
expected random.nat
wrong (|> random.nat (random.only (|>> (n.= expected) not)))
expected+ (random.list variadic random.nat)
separator (random.ascii 1)]
($_ _.and
(_.cover [/.exactly]
- (and (|> (list\map code.nat expected+)
+ (and (|> (list\each code.nat expected+)
(/.result (/.exactly times <code>.nat))
(match actual
(\ (list.equivalence n.equivalence) =
(list.first times expected+)
actual)))
- (|> (list\map code.nat expected+)
+ (|> (list\each code.nat expected+)
(/.result (/.exactly (++ variadic) <code>.nat))
fails?)))
(_.cover [/.at_least]
- (and (|> (list\map code.nat expected+)
+ (and (|> (list\each code.nat expected+)
(/.result (/.at_least times <code>.nat))
(match actual
(\ (list.equivalence n.equivalence) =
expected+
actual)))
- (|> (list\map code.nat expected+)
+ (|> (list\each code.nat expected+)
(/.result (/.at_least (++ variadic) <code>.nat))
fails?)))
(_.cover [/.at_most]
- (and (|> (list\map code.nat expected+)
+ (and (|> (list\each code.nat expected+)
(/.result (/.at_most times <code>.nat))
(match actual
(\ (list.equivalence n.equivalence) =
(list.first times expected+)
actual)))
- (|> (list\map code.nat expected+)
+ (|> (list\each code.nat expected+)
(/.result (/.at_most (++ variadic) <code>.nat))
(match actual
(\ (list.equivalence n.equivalence) =
expected+
actual)))))
(_.cover [/.between]
- (and (|> (list\map code.nat expected+)
+ (and (|> (list\each code.nat expected+)
(/.result (/.between times (n.- times variadic) <code>.nat))
(match actual
(\ (list.equivalence n.equivalence) =
expected+
actual)))
- (|> (list\map code.nat (list.first times expected+))
+ (|> (list\each code.nat (list.first times expected+))
(/.result (/.between times (n.- times variadic) <code>.nat))
(match actual
(\ (list.equivalence n.equivalence) =
(list.first times expected+)
actual)))))
(_.cover [/.separated_by]
- (|> (list.interposed (code.text separator) (list\map code.nat expected+))
+ (|> (list.interposed (code.text separator) (list\each code.nat expected+))
(/.result (/.separated_by (<code>.this! (code.text separator)) <code>.nat))
(match actual
(\ (list.equivalence n.equivalence) =
expected+
actual))))
(_.cover [/.remaining]
- (|> (list\map code.nat expected+)
+ (|> (list\each code.nat expected+)
(/.result /.remaining)
(match actual
(\ (list.equivalence code.equivalence) =
- (list\map code.nat expected+)
+ (list\each code.nat expected+)
actual))))
(_.cover [/.else]
(and (|> (/.result (/.else wrong (\ /.monad in expected)) (list))
diff --git a/stdlib/source/test/lux/control/parser/analysis.lux b/stdlib/source/test/lux/control/parser/analysis.lux
index 85ab04863..7cce374d0 100644
--- a/stdlib/source/test/lux/control/parser/analysis.lux
+++ b/stdlib/source/test/lux/control/parser/analysis.lux
@@ -53,7 +53,7 @@
[]
(`` ($_ _.and
(do {! random.monad}
- [expected (\ ! map (|>> analysis.bit) random.bit)]
+ [expected (\ ! each (|>> analysis.bit) random.bit)]
(_.cover [/.result /.any]
(|> (list expected)
(/.result /.any)
diff --git a/stdlib/source/test/lux/control/parser/binary.lux b/stdlib/source/test/lux/control/parser/binary.lux
index a3c20dbde..cdb9a1572 100644
--- a/stdlib/source/test/lux/control/parser/binary.lux
+++ b/stdlib/source/test/lux/control/parser/binary.lux
@@ -92,7 +92,7 @@
(random.rec
(function (_ recur)
(let [random_sequence (do {! random.monad}
- [size (\ ! map (n.% 2) random.nat)]
+ [size (\ ! each (n.% 2) random.nat)]
(random.list size recur))]
($_ random.and
..random_location
@@ -109,7 +109,7 @@
random_sequence
random_sequence
(do {! random.monad}
- [size (\ ! map (n.% 2) random.nat)]
+ [size (\ ! each (n.% 2) random.nat)]
(random.list size (random.and recur recur)))
)))))))
@@ -128,7 +128,7 @@
(`` ($_ _.and
(~~ (template [<size> <parser> <format>]
[(do {! random.monad}
- [expected (\ ! map (i64.and (i64.mask <size>))
+ [expected (\ ! each (i64.and (i64.mask <size>))
random.nat)]
(_.cover [<size> <parser> <format>]
(|> (format.result <format> expected)
@@ -148,7 +148,7 @@
(`` ($_ _.and
(~~ (template [<parser> <format>]
[(do {! random.monad}
- [expected (\ ! map (\ utf8.codec encoded) (random.ascii ..segment_size))]
+ [expected (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [<parser> <format>]
(|> (format.result <format> expected)
(/.result <parser>)
@@ -227,8 +227,8 @@
(and (frac.not_a_number? expected)
(frac.not_a_number? actual))))))))
(do {! random.monad}
- [expected (\ ! map (|>> (i64.and (i64.mask /.size/8))
- (n.max 2))
+ [expected (\ ! each (|>> (i64.and (i64.mask /.size/8))
+ (n.max 2))
random.nat)]
(_.cover [/.not_a_bit]
(|> expected
@@ -270,7 +270,7 @@
[/.set (/.set n.hash /.nat) format.set (format.set format.nat) (random.set n.hash ..segment_size random.nat) set.equivalence]
[/.name /.name format.name format.name ..random_name name.equivalence]))
(do {! random.monad}
- [expected (\ ! map (list.repeated ..segment_size) random.nat)]
+ [expected (\ ! each (list.repeated ..segment_size) random.nat)]
(_.cover [/.set_elements_are_not_unique]
(|> expected
(format.result (format.list format.nat))
@@ -289,8 +289,8 @@
expected
actual))))))
(do {! random.monad}
- [tag (\ ! map (|>> (i64.and (i64.mask /.size/8))
- (n.max 2))
+ [tag (\ ! each (|>> (i64.and (i64.mask /.size/8))
+ (n.max 2))
random.nat)
value random.bit]
(_.cover [/.invalid_tag]
@@ -329,14 +329,14 @@
(/.result /.any)
(!expect (#try.Success _))))
(do {! random.monad}
- [data (\ ! map (\ utf8.codec encoded) (random.ascii ..segment_size))]
+ [data (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [/.binary_was_not_fully_read]
(|> data
(/.result /.any)
(!expect (^multi (#try.Failure error)
(exception.match? /.binary_was_not_fully_read error))))))
(do {! random.monad}
- [expected (\ ! map (\ utf8.codec encoded) (random.ascii ..segment_size))]
+ [expected (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [/.segment format.segment format.result]
(|> expected
(format.result (format.segment ..segment_size))
@@ -344,7 +344,7 @@
(!expect (^multi (#try.Success actual)
(\ binary.equivalence = expected actual))))))
(do {! random.monad}
- [data (\ ! map (\ utf8.codec encoded) (random.ascii ..segment_size))]
+ [data (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [/.end?]
(|> data
(/.result (do <>.monad
@@ -355,8 +355,8 @@
post))))
(!expect (#try.Success #1)))))
(do {! random.monad}
- [to_read (\ ! map (n.% (++ ..segment_size)) random.nat)
- data (\ ! map (\ utf8.codec encoded) (random.ascii ..segment_size))]
+ [to_read (\ ! each (n.% (++ ..segment_size)) random.nat)
+ data (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [/.Offset /.offset]
(|> data
(/.result (do <>.monad
@@ -370,8 +370,8 @@
(n.= ..segment_size nothing_left)))))
(!expect (#try.Success #1)))))
(do {! random.monad}
- [to_read (\ ! map (n.% (++ ..segment_size)) random.nat)
- data (\ ! map (\ utf8.codec encoded) (random.ascii ..segment_size))]
+ [to_read (\ ! each (n.% (++ ..segment_size)) random.nat)
+ data (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [/.remaining]
(|> data
(/.result (do <>.monad
diff --git a/stdlib/source/test/lux/control/parser/cli.lux b/stdlib/source/test/lux/control/parser/cli.lux
index 9c1247775..a70abb3b4 100644
--- a/stdlib/source/test/lux/control/parser/cli.lux
+++ b/stdlib/source/test/lux/control/parser/cli.lux
@@ -31,7 +31,7 @@
(<| (_.covering /._)
(_.for [/.Parser])
(do {! random.monad}
- [expected (\ ! map n\encoded random.nat)
+ [expected (\ ! each n\encoded random.nat)
.let [random_dummy (random.only (|>> (text\= expected) not)
(random.unicode 5))]
dummy random_dummy
diff --git a/stdlib/source/test/lux/control/parser/code.lux b/stdlib/source/test/lux/control/parser/code.lux
index b6a3768d4..99ea38f16 100644
--- a/stdlib/source/test/lux/control/parser/code.lux
+++ b/stdlib/source/test/lux/control/parser/code.lux
@@ -45,7 +45,7 @@
(_.for [/.Parser])
(`` ($_ _.and
(do {! random.monad}
- [expected (\ ! map code.bit random.bit)]
+ [expected (\ ! each code.bit random.bit)]
(_.cover [/.result]
(and (|> (/.result /.any (list expected))
(!expect (#try.Success _)))
@@ -67,7 +67,7 @@
(!expect (#try.Failure _)))))
))]
- [/.any /.this! (\ ! map code.bit random.bit) function.identity code.equivalence]
+ [/.any /.this! (\ ! each code.bit random.bit) function.identity code.equivalence]
[/.bit /.bit! random.bit code.bit bit.equivalence]
[/.nat /.nat! random.nat code.nat nat.equivalence]
[/.int /.int! random.int code.int int.equivalence]
@@ -115,7 +115,7 @@
(and (\ nat.equivalence = expected_local actual_local)
(\ int.equivalence = expected_global actual_global)))))))
(do {! random.monad}
- [dummy (\ ! map code.bit random.bit)]
+ [dummy (\ ! each code.bit random.bit)]
(_.cover [/.end?]
(|> (/.result (do <>.monad
[pre /.end?
@@ -127,7 +127,7 @@
(!expect (^multi (#try.Success verdict)
verdict)))))
(do {! random.monad}
- [dummy (\ ! map code.bit random.bit)]
+ [dummy (\ ! each code.bit random.bit)]
(_.cover [/.end!]
(and (|> (/.result /.end! (list))
(!expect (#try.Success [])))
diff --git a/stdlib/source/test/lux/control/parser/environment.lux b/stdlib/source/test/lux/control/parser/environment.lux
index ba846b8b2..a1652a95f 100644
--- a/stdlib/source/test/lux/control/parser/environment.lux
+++ b/stdlib/source/test/lux/control/parser/environment.lux
@@ -30,7 +30,7 @@
[expected random.nat]
(_.cover [/.result]
(|> (/.result (//\in expected) /.empty)
- (\ try.functor map (n.= expected))
+ (\ try.functor each (n.= expected))
(try.else false))))
(do random.monad
[property (random.ascii/alpha 1)
@@ -39,7 +39,7 @@
(|> /.empty
(dictionary.has property expected)
(/.result (/.property property))
- (\ try.functor map (text\= expected))
+ (\ try.functor each (text\= expected))
(try.else false))))
(do random.monad
[property (random.ascii/alpha 1)]
diff --git a/stdlib/source/test/lux/control/parser/json.lux b/stdlib/source/test/lux/control/parser/json.lux
index a87396228..043f00979 100644
--- a/stdlib/source/test/lux/control/parser/json.lux
+++ b/stdlib/source/test/lux/control/parser/json.lux
@@ -46,7 +46,7 @@
(_.for [/.Parser])
(`` ($_ _.and
(do {! random.monad}
- [expected (\ ! map (|>> #json.String) (random.unicode 1))]
+ [expected (\ ! each (|>> #json.String) (random.unicode 1))]
(_.cover [/.result /.any]
(|> (/.result /.any expected)
(!expect (^multi (#try.Success actual)
@@ -102,17 +102,17 @@
(!expect (^multi (#try.Success actual)
(\ (maybe.equivalence text.equivalence) = (#.Some expected) actual)))))))
(do {! random.monad}
- [size (\ ! map (n.% 10) random.nat)
+ [size (\ ! each (n.% 10) random.nat)
expected (|> (random.unicode 1)
(random.list size)
- (\ ! map row.of_list))]
+ (\ ! each row.of_list))]
(_.cover [/.array]
(|> (/.result (/.array (<>.some /.string))
- (#json.Array (row\map (|>> #json.String) expected)))
+ (#json.Array (row\each (|>> #json.String) expected)))
(!expect (^multi (#try.Success actual)
(\ (row.equivalence text.equivalence) = expected (row.of_list actual)))))))
(do {! random.monad}
- [expected (\ ! map (|>> #json.String) (random.unicode 1))]
+ [expected (\ ! each (|>> #json.String) (random.unicode 1))]
(_.cover [/.unconsumed_input]
(|> (/.result (/.array /.any) (#json.Array (row expected expected)))
(!expect (^multi (#try.Failure error)
@@ -126,12 +126,12 @@
expected_number ..safe_frac
expected_string (random.unicode 1)
[boolean_field number_field string_field] (|> (random.set text.hash 3 (random.unicode 3))
- (\ ! map (|>> set.list
- (case> (^ (list boolean_field number_field string_field))
- [boolean_field number_field string_field]
+ (\ ! each (|>> set.list
+ (case> (^ (list boolean_field number_field string_field))
+ [boolean_field number_field string_field]
- _
- (undefined)))))]
+ _
+ (undefined)))))]
(_.cover [/.object /.field]
(|> (/.result (/.object ($_ <>.and
(/.field boolean_field /.boolean)
@@ -147,7 +147,7 @@
(\ frac.equivalence = expected_number actual_number)
(\ text.equivalence = expected_string actual_string)))))))
(do {! random.monad}
- [size (\ ! map (n.% 10) random.nat)
+ [size (\ ! each (n.% 10) random.nat)
keys (random.list size (random.unicode 1))
values (random.list size (random.unicode 1))
.let [expected (dictionary.of_list text.hash (list.zipped/2 keys values))]]
@@ -155,7 +155,7 @@
(|> (/.result (/.dictionary /.string)
(#json.Object
(|> values
- (list\map (|>> #json.String))
+ (list\each (|>> #json.String))
(list.zipped/2 keys)
(dictionary.of_list text.hash))))
(!expect (^multi (#try.Success actual)
diff --git a/stdlib/source/test/lux/control/parser/synthesis.lux b/stdlib/source/test/lux/control/parser/synthesis.lux
index e412ff262..82b851696 100644
--- a/stdlib/source/test/lux/control/parser/synthesis.lux
+++ b/stdlib/source/test/lux/control/parser/synthesis.lux
@@ -53,9 +53,9 @@
(def: random_environment
(Random (Environment Synthesis))
(do {! random.monad}
- [size (\ ! map (n.% 5) random.nat)]
+ [size (\ ! each (n.% 5) random.nat)]
(|> ..random_variable
- (\ ! map (|>> synthesis.variable))
+ (\ ! each (|>> synthesis.variable))
(random.list size))))
(def: simple
@@ -79,7 +79,7 @@
))]
[/.bit /.bit! random.bit synthesis.bit bit.equivalence]
- [/.i64 /.i64! (\ ! map .i64 random.nat) synthesis.i64 i64.equivalence]
+ [/.i64 /.i64! (\ ! each .i64 random.nat) synthesis.i64 i64.equivalence]
[/.f64 /.f64! random.safe_frac synthesis.f64 frac.equivalence]
[/.text /.text! (random.unicode 1) synthesis.text text.equivalence]
[/.local /.local! random.nat synthesis.variable/local n.equivalence]
@@ -93,7 +93,7 @@
($_ _.and
(do {! random.monad}
[expected_bit random.bit
- expected_i64 (\ ! map .i64 random.nat)
+ expected_i64 (\ ! each .i64 random.nat)
expected_f64 random.safe_frac
expected_text (random.unicode 1)]
(_.cover [/.tuple]
@@ -137,14 +137,14 @@
(!expect (^multi (#try.Failure error)
(exception.match? /.wrong_arity error))))))
(do {! random.monad}
- [arity (\ ! map (|>> (n.% 10) ++) random.nat)
+ [arity (\ ! each (|>> (n.% 10) ++) random.nat)
expected_offset random.nat
expected_inits (random.list arity random.bit)
expected_body (random.unicode 1)]
(_.cover [/.loop]
(and (|> (/.result (/.loop (<>.many /.bit) /.text)
(list (synthesis.loop/scope [expected_offset
- (list\map (|>> synthesis.bit) expected_inits)
+ (list\each (|>> synthesis.bit) expected_inits)
(synthesis.text expected_body)])))
(!expect (^multi (#try.Success [actual_offset actual_inits actual_body])
(and (\ n.equivalence = expected_offset actual_offset)
@@ -164,7 +164,7 @@
(_.for [/.Parser])
($_ _.and
(do {! random.monad}
- [expected (\ ! map (|>> synthesis.i64) random.nat)]
+ [expected (\ ! each (|>> synthesis.i64) random.nat)]
(_.cover [/.result /.any]
(|> (/.result /.any (list expected))
(!expect (^multi (#try.Success actual)
@@ -174,13 +174,13 @@
(!expect (^multi (#try.Failure error)
(exception.match? /.empty_input error)))))
(do {! random.monad}
- [expected (\ ! map (|>> synthesis.i64) random.nat)]
+ [expected (\ ! each (|>> synthesis.i64) random.nat)]
(_.cover [/.unconsumed_input]
(|> (/.result /.any (list expected expected))
(!expect (^multi (#try.Failure error)
(exception.match? /.unconsumed_input error))))))
(do {! random.monad}
- [dummy (\ ! map (|>> synthesis.i64) random.nat)]
+ [dummy (\ ! each (|>> synthesis.i64) random.nat)]
(_.cover [/.end! /.expected_empty_input]
(and (|> (/.result /.end! (list))
(!expect (#try.Success _)))
@@ -188,7 +188,7 @@
(!expect (^multi (#try.Failure error)
(exception.match? /.expected_empty_input error)))))))
(do {! random.monad}
- [dummy (\ ! map (|>> synthesis.i64) random.nat)]
+ [dummy (\ ! each (|>> synthesis.i64) random.nat)]
(_.cover [/.end?]
(and (|> (/.result /.end? (list))
(!expect (#try.Success #1)))
diff --git a/stdlib/source/test/lux/control/parser/text.lux b/stdlib/source/test/lux/control/parser/text.lux
index b3767ab01..3b28d2390 100644
--- a/stdlib/source/test/lux/control/parser/text.lux
+++ b/stdlib/source/test/lux/control/parser/text.lux
@@ -61,7 +61,7 @@
(-> Text (/.Parser Text) Bit)
(|> expected
(/.result parser)
- (\ try.functor map (text\= expected))
+ (\ try.functor each (text\= expected))
(try.else false)))
(def: (should_pass! expected parser)
@@ -72,13 +72,13 @@
Test
($_ _.and
(do {! random.monad}
- [offset (\ ! map (n.% 50) random.nat)
- range (\ ! map (|>> (n.% 50) (n.+ 10)) random.nat)
+ [offset (\ ! each (n.% 50) random.nat)
+ range (\ ! each (|>> (n.% 50) (n.+ 10)) random.nat)
.let [limit (n.+ offset range)]
- expected (\ ! map (|>> (n.% range) (n.+ offset) text.of_char) random.nat)
+ expected (\ ! each (|>> (n.% range) (n.+ offset) text.of_char) random.nat)
out_of_range (case offset
- 0 (\ ! map (|>> (n.% 10) ++ (n.+ limit) text.of_char) random.nat)
- _ (\ ! map (|>> (n.% offset) text.of_char) random.nat))]
+ 0 (\ ! each (|>> (n.% 10) ++ (n.+ limit) text.of_char) random.nat)
+ _ (\ ! each (|>> (n.% offset) text.of_char) random.nat))]
(_.cover [/.range]
(and (..should_pass expected (/.range offset limit))
(..should_fail out_of_range (/.range offset limit)))))
@@ -97,19 +97,19 @@
(and (..should_pass (text.of_char expected) /.lower)
(..should_fail (text.of_char invalid) /.lower))))
(do {! random.monad}
- [expected (\ ! map (n.% 10) random.nat)
+ [expected (\ ! each (n.% 10) random.nat)
invalid (random.char (unicode.set [unicode/block.number_forms (list)]))]
(_.cover [/.decimal]
(and (..should_pass (\ n.decimal encoded expected) /.decimal)
(..should_fail (text.of_char invalid) /.decimal))))
(do {! random.monad}
- [expected (\ ! map (n.% 8) random.nat)
+ [expected (\ ! each (n.% 8) random.nat)
invalid (random.char (unicode.set [unicode/block.number_forms (list)]))]
(_.cover [/.octal]
(and (..should_pass (\ n.octal encoded expected) /.octal)
(..should_fail (text.of_char invalid) /.octal))))
(do {! random.monad}
- [expected (\ ! map (n.% 16) random.nat)
+ [expected (\ ! each (n.% 16) random.nat)
invalid (random.char (unicode.set [unicode/block.number_forms (list)]))]
(_.cover [/.hexadecimal]
(and (..should_pass (\ n.hex encoded expected) /.hexadecimal)
@@ -155,13 +155,13 @@
[.let [num_options 3]
options (|> (random.char unicode.character)
(random.set n.hash num_options)
- (\ ! map (|>> set.list
- (list\map text.of_char)
- text.together)))
- expected (\ ! map (function (_ value)
- (|> options
- (text.char (n.% num_options value))
- maybe.trusted))
+ (\ ! each (|>> set.list
+ (list\each text.of_char)
+ text.together)))
+ expected (\ ! each (function (_ value)
+ (|> options
+ (text.char (n.% num_options value))
+ maybe.trusted))
random.nat)
invalid (random.only (function (_ char)
(not (text.contains? (text.of_char char) options)))
@@ -181,13 +181,13 @@
[.let [num_options 3]
options (|> (random.char unicode.character)
(random.set n.hash num_options)
- (\ ! map (|>> set.list
- (list\map text.of_char)
- text.together)))
- invalid (\ ! map (function (_ value)
- (|> options
- (text.char (n.% num_options value))
- maybe.trusted))
+ (\ ! each (|>> set.list
+ (list\each text.of_char)
+ text.together)))
+ invalid (\ ! each (function (_ value)
+ (|> options
+ (text.char (n.% num_options value))
+ maybe.trusted))
random.nat)
expected (random.only (function (_ char)
(not (text.contains? (text.of_char char) options)))
@@ -210,26 +210,26 @@
(let [octal! (/.one_of! "01234567")]
($_ _.and
(do {! random.monad}
- [left (\ ! map (|>> (n.% 8) (\ n.octal encoded)) random.nat)
- right (\ ! map (|>> (n.% 8) (\ n.octal encoded)) random.nat)
+ [left (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)
+ right (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)
.let [expected (format left right)]
invalid (|> random.nat
- (\ ! map (n.% 16))
+ (\ ! each (n.% 16))
(random.only (n.>= 8))
- (\ ! map (\ n.hex encoded)))]
+ (\ ! each (\ n.hex encoded)))]
(_.cover [/.many /.many!]
(and (..should_pass expected (/.many /.octal))
(..should_fail invalid (/.many /.octal))
(..should_pass! expected (/.many! octal!)))))
(do {! random.monad}
- [left (\ ! map (|>> (n.% 8) (\ n.octal encoded)) random.nat)
- right (\ ! map (|>> (n.% 8) (\ n.octal encoded)) random.nat)
+ [left (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)
+ right (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)
.let [expected (format left right)]
invalid (|> random.nat
- (\ ! map (n.% 16))
+ (\ ! each (n.% 16))
(random.only (n.>= 8))
- (\ ! map (\ n.hex encoded)))]
+ (\ ! each (\ n.hex encoded)))]
(_.cover [/.some /.some!]
(and (..should_pass expected (/.some /.octal))
(..should_pass "" (/.some /.octal))
@@ -238,7 +238,7 @@
(..should_pass! expected (/.some! octal!))
(..should_pass! "" (/.some! octal!)))))
(do {! random.monad}
- [.let [octal (\ ! map (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
+ [.let [octal (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
first octal
second octal
third octal]
@@ -251,7 +251,7 @@
(..should_fail (format first second third) (/.exactly! 2 octal!))
(..should_fail (format first) (/.exactly! 2 octal!)))))
(do {! random.monad}
- [.let [octal (\ ! map (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
+ [.let [octal (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
first octal
second octal
third octal]
@@ -264,7 +264,7 @@
(..should_pass! (format first) (/.at_most! 2 octal!))
(..should_fail (format first second third) (/.at_most! 2 octal!)))))
(do {! random.monad}
- [.let [octal (\ ! map (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
+ [.let [octal (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
first octal
second octal
third octal]
@@ -277,7 +277,7 @@
(..should_pass! (format first second third) (/.at_least! 2 octal!))
(..should_fail (format first) (/.at_least! 2 octal!)))))
(do {! random.monad}
- [.let [octal (\ ! map (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
+ [.let [octal (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
first octal
second octal
third octal]
@@ -389,7 +389,7 @@
(/.this output)))
(!expect (#try.Success _)))))
(do {! random.monad}
- [expected (\ ! map (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
+ [expected (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
(_.cover [/.then]
(|> (list (code.text expected))
(<c>.result (/.then /.octal <c>.text))
diff --git a/stdlib/source/test/lux/control/parser/type.lux b/stdlib/source/test/lux/control/parser/type.lux
index dc901e3c4..fd1706b0f 100644
--- a/stdlib/source/test/lux/control/parser/type.lux
+++ b/stdlib/source/test/lux/control/parser/type.lux
@@ -31,8 +31,8 @@
(def: primitive
(Random Type)
(|> (random.ascii/alpha_num 1)
- (\ random.monad map (function (_ name)
- (#.Primitive name (list))))))
+ (\ random.monad each (function (_ name)
+ (#.Primitive name (list))))))
(def: matches
Test
@@ -166,7 +166,7 @@
Test
(do {! random.monad}
[not_polymorphic ..primitive
- expected_inputs (\ ! map (|>> (n.% 10) ++) random.nat)]
+ expected_inputs (\ ! each (|>> (n.% 10) ++) random.nat)]
($_ _.and
(_.cover [/.not_polymorphic]
(and (|> (/.result (/.polymorphic /.any)
diff --git a/stdlib/source/test/lux/control/parser/xml.lux b/stdlib/source/test/lux/control/parser/xml.lux
index e92216696..ffc96e172 100644
--- a/stdlib/source/test/lux/control/parser/xml.lux
+++ b/stdlib/source/test/lux/control/parser/xml.lux
@@ -69,10 +69,10 @@
[[(//\in expected)
(#xml.Text expected)]])
(do {! random.monad}
- [expected (\ ! map (|>> #xml.Text) (random.ascii/alpha 1))]
+ [expected (\ ! each (|>> #xml.Text) (random.ascii/alpha 1))]
(_.cover [/.any]
(|> (/.result /.any (list expected))
- (try\map (xml\= expected))
+ (try\each (xml\= expected))
(try.else false))))
(do {! random.monad}
[expected ..random_tag]
@@ -159,7 +159,7 @@
(//\in []))
_ (//.some /.any)]
(in [])))]
- repetitions (\ ! map (n.% 10) random.nat)]
+ repetitions (\ ! each (n.% 10) random.nat)]
($_ _.and
(_.cover [/.somewhere]
(|> (/.result parser
diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux
index 555f30b4f..5cf65f56b 100644
--- a/stdlib/source/test/lux/control/region.lux
+++ b/stdlib/source/test/lux/control/region.lux
@@ -81,7 +81,7 @@
(<| (_.covering /._)
(_.for [/.Region])
(do {! random.monad}
- [expected_clean_ups (|> random.nat (\ ! map (|>> (n.% 100) (n.max 1))))]
+ [expected_clean_ups (|> random.nat (\ ! each (|>> (n.% 100) (n.max 1))))]
($_ _.and
(_.for [/.functor]
($functor.spec ..injection ..comparison (: (All [! r]
@@ -107,8 +107,8 @@
(in (#try.Success []))))]
outcome (/.run! !
(do {! (/.monad !)}
- [_ (monad.map ! (/.acquire! //@ count_clean_up)
- (enum.range n.enum 1 expected_clean_ups))]
+ [_ (monad.each ! (/.acquire! //@ count_clean_up)
+ (enum.range n.enum 1 expected_clean_ups))]
(in [])))
actual_clean_ups (thread.read! clean_up_counter)]
(in (and (..success? outcome)
@@ -125,8 +125,8 @@
(in (#try.Success []))))]
outcome (/.run! !
(do {! (/.monad !)}
- [_ (monad.map ! (/.acquire! //@ count_clean_up)
- (enum.range n.enum 1 expected_clean_ups))
+ [_ (monad.each ! (/.acquire! //@ count_clean_up)
+ (enum.range n.enum 1 expected_clean_ups))
_ (/.failure //@ (exception.error ..oops []))]
(in [])))
actual_clean_ups (thread.read! clean_up_counter)]
@@ -144,8 +144,8 @@
(in (#try.Success []))))]
outcome (/.run! !
(do {! (/.monad !)}
- [_ (monad.map ! (/.acquire! //@ count_clean_up)
- (enum.range n.enum 1 expected_clean_ups))
+ [_ (monad.each ! (/.acquire! //@ count_clean_up)
+ (enum.range n.enum 1 expected_clean_ups))
_ (/.except //@ ..oops [])]
(in [])))
actual_clean_ups (thread.read! clean_up_counter)]
@@ -164,8 +164,8 @@
(exception.except ..oops [])))))]
outcome (/.run! !
(do {! (/.monad !)}
- [_ (monad.map ! (/.acquire! //@ count_clean_up)
- (enum.range n.enum 1 expected_clean_ups))]
+ [_ (monad.each ! (/.acquire! //@ count_clean_up)
+ (enum.range n.enum 1 expected_clean_ups))]
(in [])))
actual_clean_ups (thread.read! clean_up_counter)]
(in (and (or (n.= 0 expected_clean_ups)
diff --git a/stdlib/source/test/lux/control/remember.lux b/stdlib/source/test/lux/control/remember.lux
index 045e2d0df..ae5240f7e 100644
--- a/stdlib/source/test/lux/control/remember.lux
+++ b/stdlib/source/test/lux/control/remember.lux
@@ -29,8 +29,8 @@
["." /]])
(def: deadline (Random Date) random.date)
-(def: message (Random Text) (random\map %.bit random.bit))
-(def: focus (Random Code) (random\map code.bit random.bit))
+(def: message (Random Text) (random\each %.bit random.bit))
+(def: focus (Random Code) (random\each code.bit random.bit))
(def: (memory macro deadline message focus)
(-> Name Date Text (Maybe Code) Code)
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux
index eda78cbeb..10bda7445 100644
--- a/stdlib/source/test/lux/control/state.lux
+++ b/stdlib/source/test/lux/control/state.lux
@@ -82,7 +82,7 @@
(def: loops
Test
(do {! random.monad}
- [limit (|> random.nat (\ ! map (n.% 10)))
+ [limit (|> random.nat (\ ! each (n.% 10)))
.let [condition (do /.monad
[state /.get]
(in (n.< limit state)))]]
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 9d843b540..6ee71541c 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -79,13 +79,13 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [.let [gen_size (|> random.nat (\ ! map (|>> (n.% 100) (n.max 8))))]
+ [.let [gen_size (|> random.nat (\ ! each (|>> (n.% 100) (n.max 8))))]
size gen_size
sample (..random size)
value random.nat
- .let [gen_idx (|> random.nat (\ ! map (n.% size)))]
+ .let [gen_idx (|> random.nat (\ ! each (n.% size)))]
offset gen_idx
- length (\ ! map (n.% (n.- offset size)) random.nat)]
+ length (\ ! each (n.% (n.- offset size)) random.nat)]
(_.for [/.Binary]
($_ _.and
(_.for [/.equivalence]
@@ -121,8 +121,8 @@
reader (function (_ binary idx)
(/.read/8! idx binary))]
(and (n.= length (/.size random_slice))
- (case [(monad.map try.monad (|>> (n.+ offset) (reader sample)) idxs)
- (monad.map try.monad (reader random_slice) idxs)]
+ (case [(monad.each try.monad (|>> (n.+ offset) (reader sample)) idxs)
+ (monad.each try.monad (reader random_slice) idxs)]
[(#try.Success binary_vals) (#try.Success slice_vals)]
(\ (list.equivalence n.equivalence) = binary_vals slice_vals)
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux
index c7fad1619..03ff479ff 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -29,7 +29,7 @@
(def: bounded_size
(Random Nat)
- (\ random.monad map (|>> (n.% 100) (n.+ 1))
+ (\ random.monad each (|>> (n.% 100) (n.+ 1))
random.nat))
(def: structures
@@ -169,7 +169,7 @@
_
false)))
(do !
- [occupancy (\ ! map (n.% (++ size)) random.nat)]
+ [occupancy (\ ! each (n.% (++ size)) random.nat)]
(_.cover [/.occupancy /.vacancy]
(let [the_array (loop [output (: (Array Nat)
(/.empty size))
@@ -189,7 +189,7 @@
(|> the_array /.list /.of_list
(\ (/.equivalence n.equivalence) = the_array)))))
(do !
- [amount (\ ! map (n.% (++ size)) random.nat)]
+ [amount (\ ! each (n.% (++ size)) random.nat)]
(_.cover [/.copy!]
(let [copy (: (Array Nat)
(/.empty size))]
diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux
index c0e54e3bb..3d28272fb 100644
--- a/stdlib/source/test/lux/data/collection/bits.lux
+++ b/stdlib/source/test/lux/data/collection/bits.lux
@@ -17,16 +17,16 @@
(def: (size min max)
(-> Nat Nat (Random Nat))
(|> random.nat
- (\ random.monad map (|>> (n.% (++ max)) (n.max min)))))
+ (\ random.monad each (|>> (n.% (++ max)) (n.max min)))))
(def: .public random
(Random Bits)
(do {! random.monad}
- [size (\ ! map (n.% 1,000) random.nat)]
+ [size (\ ! each (n.% 1,000) random.nat)]
(case size
0 (in /.empty)
_ (do {! random.monad}
- [idx (|> random.nat (\ ! map (n.% size)))]
+ [idx (|> random.nat (\ ! each (n.% size)))]
(in (/.one idx /.empty))))))
(def: .public test
@@ -47,8 +47,8 @@
(/.empty? /.empty))
(do {! random.monad}
- [size (\ ! map (|>> (n.% 1,000) ++) random.nat)
- idx (\ ! map (n.% size) random.nat)
+ [size (\ ! each (|>> (n.% 1,000) ++) random.nat)
+ idx (\ ! each (n.% size) random.nat)
sample ..random]
($_ _.and
(_.cover [/.bit /.one]
diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux
index 446c4e354..60312b812 100644
--- a/stdlib/source/test/lux/data/collection/dictionary.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary.lux
@@ -31,7 +31,7 @@
(def: for_dictionaries
Test
(do {! random.monad}
- [.let [capped_nat (\ random.monad map (n.% 100) random.nat)]
+ [.let [capped_nat (\ random.monad each (n.% 100) random.nat)]
size capped_nat
dict (random.dictionary n.hash size random.nat capped_nat)
non_key (random.only (|>> (/.key? dict) not)
@@ -71,7 +71,7 @@
unique_keys!
(|> entries
- (list\map product.left)
+ (list\each product.left)
(set.of_list n.hash)
set.size
(n.= (/.size dict)))
@@ -80,7 +80,7 @@
(list.every? (function (_ [key value])
(|> dict
(/.value key)
- (maybe\map (n.= value))
+ (maybe\each (n.= value))
(maybe.else false)))
entries)]
(and correct_size!
@@ -112,7 +112,7 @@
(let [merging_with_oneself (let [(^open ".") (/.equivalence n.equivalence)]
(= dict (/.merged dict dict)))
overwritting_keys (let [dict' (|> dict /.entries
- (list\map (function (_ [k v]) [k (++ v)]))
+ (list\each (function (_ [k v]) [k (++ v)]))
(/.of_list n.hash))
(^open ".") (/.equivalence n.equivalence)]
(= dict' (/.merged dict' dict)))]
@@ -133,7 +133,7 @@
(def: for_entries
Test
(do random.monad
- [.let [capped_nat (\ random.monad map (n.% 100) random.nat)]
+ [.let [capped_nat (\ random.monad each (n.% 100) random.nat)]
size capped_nat
dict (random.dictionary n.hash size random.nat capped_nat)
non_key (random.only (|>> (/.key? dict) not)
@@ -253,7 +253,7 @@
(<| (_.covering /._)
(_.for [/.Dictionary])
(do random.monad
- [.let [capped_nat (\ random.monad map (n.% 100) random.nat)]
+ [.let [capped_nat (\ random.monad each (n.% 100) random.nat)]
size capped_nat
dict (random.dictionary n.hash size random.nat capped_nat)
non_key (random.only (|>> (/.key? dict) not)
diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
index 7f6178f8e..739756640 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -43,7 +43,7 @@
(<| (_.covering /._)
(_.for [/.Dictionary])
(do {! random.monad}
- [size (\ ! map (n.% 100) random.nat)
+ [size (\ ! each (n.% 100) random.nat)
keys (random.set n.hash size random.nat)
values (random.set n.hash size random.nat)
extra_key (random.only (|>> (set.member? keys) not)
@@ -56,7 +56,7 @@
sorted_pairs (list.sorted (function (_ [left _] [right _])
(n.< left right))
pairs)
- sorted_values (list\map product.right sorted_pairs)
+ sorted_values (list\each product.right sorted_pairs)
(^open "list\.") (list.equivalence (: (Equivalence [Nat Nat])
(function (_ [kr vr] [ks vs])
(and (n.= kr ks)
@@ -132,6 +132,6 @@
(/.has extra_key extra_value)
(/.revised extra_key (n.+ shift))
(/.value extra_key)
- (maybe\map (n.= (n.+ shift extra_value)))
+ (maybe\each (n.= (n.+ shift extra_value)))
(maybe.else false)))
))))
diff --git a/stdlib/source/test/lux/data/collection/dictionary/plist.lux b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
index 2172fbd44..f83e4cf82 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
@@ -35,7 +35,7 @@
(_.for [/.PList])
(do {! random.monad}
[.let [gen_key (random.ascii/alpha 10)]
- size (\ ! map (n.% 100) random.nat)
+ size (\ ! each (n.% 100) random.nat)
sample (..random size gen_key random.nat)
.let [keys (|> sample /.keys (set.of_list text.hash))]
@@ -75,14 +75,14 @@
(|> sample
(/.has extra_key extra_value)
(/.value extra_key)
- (maybe\map (n.= extra_value))
+ (maybe\each (n.= extra_value))
(maybe.else false)))
(_.cover [/.revised]
(|> sample
(/.has extra_key extra_value)
(/.revised extra_key (n.+ shift))
(/.value extra_key)
- (maybe\map (n.= (n.+ shift extra_value)))
+ (maybe\each (n.= (n.+ shift extra_value)))
(maybe.else false)))
(_.cover [/.lacks]
(|> sample
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index 41139da07..1f6749dc3 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -34,7 +34,7 @@
(def: bounded_size
(Random Nat)
- (\ random.monad map (n.% 100)
+ (\ random.monad each (n.% 100)
random.nat))
(def: random
@@ -43,7 +43,7 @@
[size ..bounded_size]
(|> random.nat
(random.set n.hash size)
- (\ ! map set.list))))
+ (\ ! each set.list))))
(def: signatures
Test
@@ -52,7 +52,7 @@
($equivalence.spec (/.equivalence n.equivalence) ..random))
(_.for [/.hash]
(|> random.nat
- (\ random.monad map (|>> list))
+ (\ random.monad each (|>> list))
($hash.spec (/.hash n.hash))))
(_.for [/.monoid]
($monoid.spec (/.equivalence n.equivalence) /.monoid ..random))
@@ -88,7 +88,7 @@
(do {! random.monad}
[size ..bounded_size
.let [(^open "/\.") (/.equivalence n.equivalence)]
- sample (\ ! map set.list (random.set n.hash size random.nat))]
+ sample (\ ! each set.list (random.set n.hash size random.nat))]
($_ _.and
(_.cover [/.size]
(n.= size (/.size sample)))
@@ -158,11 +158,11 @@
has_correct_indices!
(/\= (/.indices (/.size enumeration))
- (/\map product.left enumeration))
+ (/\each product.left enumeration))
has_correct_values!
(/\= sample
- (/\map product.right enumeration))]
+ (/\each product.right enumeration))]
(and has_correct_indices!
has_correct_values!)))
(_.cover [/.item]
@@ -184,8 +184,8 @@
[sample (random.only (|>> /.size (n.> 0))
..random)
.let [size (/.size sample)]
- idx (\ ! map (n.% size) random.nat)
- sub_size (\ ! map (|>> (n.% size) ++) random.nat)]
+ idx (\ ! each (n.% size) random.nat)
+ sub_size (\ ! each (|>> (n.% size) ++) random.nat)]
($_ _.and
(_.cover [/.only]
(let [positives (/.only n.even? sample)
@@ -205,19 +205,19 @@
(_.cover [/.split_at]
(let [[left right] (/.split_at idx sample)]
(/\= sample
- (/\compose left right))))
+ (/\composite left right))))
(_.cover [/.split_when]
(let [[left right] (/.split_when n.even? sample)]
(/\= sample
- (/\compose left right))))
+ (/\composite left right))))
(_.cover [/.first /.after]
(/\= sample
- (/\compose (/.first idx sample)
- (/.after idx sample))))
+ (/\composite (/.first idx sample)
+ (/.after idx sample))))
(_.cover [/.while /.until]
(/\= sample
- (/\compose (/.while n.even? sample)
- (/.until n.even? sample))))
+ (/\composite (/.while n.even? sample)
+ (/.until n.even? sample))))
(_.cover [/.sub]
(let [subs (/.sub sub_size sample)]
(and (/.every? (|>> /.size (n.<= sub_size)) subs)
@@ -293,9 +293,9 @@
can_extract_values!
(and (/\= (/.first zipped::size sample/0)
- (/\map product.left zipped))
+ (/\each product.left zipped))
(/\= (/.first zipped::size sample/1)
- (/\map product.right zipped)))]
+ (/\each product.right zipped)))]
(and size_of_smaller_list!
can_extract_values!)))
(_.cover [/.zipped/3]
@@ -311,11 +311,11 @@
can_extract_values!
(and (/\= (/.first zipped::size sample/0)
- (/\map product.left zipped))
+ (/\each product.left zipped))
(/\= (/.first zipped::size sample/1)
- (/\map (|>> product.right product.left) zipped))
+ (/\each (|>> product.right product.left) zipped))
(/\= (/.first zipped::size sample/2)
- (/\map (|>> product.right product.right) zipped)))]
+ (/\each (|>> product.right product.right) zipped)))]
(and size_of_smaller_list!
can_extract_values!)))
(_.cover [/.zipped]
@@ -327,14 +327,14 @@
((/.zipped 3) sample/0 sample/1 sample/2))))
(_.cover [/.zipped_with/2]
- (/\= (/\map (function (_ [left right])
- (+/2 left right))
- (/.zipped/2 sample/0 sample/1))
+ (/\= (/\each (function (_ [left right])
+ (+/2 left right))
+ (/.zipped/2 sample/0 sample/1))
(/.zipped_with/2 +/2 sample/0 sample/1)))
(_.cover [/.zipped_with/3]
- (/\= (/\map (function (_ [left mid right])
- (+/3 left mid right))
- (/.zipped/3 sample/0 sample/1 sample/2))
+ (/\= (/\each (function (_ [left mid right])
+ (+/3 left mid right))
+ (/.zipped/3 sample/0 sample/1 sample/2))
(/.zipped_with/3 +/3 sample/0 sample/1 sample/2)))
(_.cover [/.zipped_with]
(and (/\= (/.zipped_with/2 +/2 sample/0 sample/1)
@@ -342,9 +342,9 @@
(/\= (/.zipped_with/3 +/3 sample/0 sample/1 sample/2)
((/.zipped_with 3) +/3 sample/0 sample/1 sample/2))))
(_.cover [/.together]
- (and (/\= (/\compose sample/0 sample/1)
+ (and (/\= (/\composite sample/0 sample/1)
(/.together (list sample/0 sample/1)))
- (/\= ($_ /\compose sample/0 sample/1 sample/2)
+ (/\= ($_ /\composite sample/0 sample/1 sample/2)
(/.together (list sample/0 sample/1 sample/2)))))
))))
@@ -363,7 +363,7 @@
(_.cover [/.one]
(case [(|> sample
(/.only n.even?)
- (/\map (\ n.decimal encoded))
+ (/\each (\ n.decimal encoded))
/.head)
(/.one choose sample)]
[(#.Some expected) (#.Some actual)]
@@ -378,7 +378,7 @@
(\ (/.equivalence text.equivalence) =
(|> sample
(/.only n.even?)
- (/\map (\ n.decimal encoded)))
+ (/\each (\ n.decimal encoded)))
(/.all choose sample)))
(_.cover [/.example]
(case (/.example n.even? sample)
@@ -423,9 +423,9 @@
#.None))
0)))))
(_.cover [/.mixes]
- (/\= (/\map (function (_ index)
- (\ /.mix mix n.+ 0 (/.first index sample)))
- (/.indices (++ (/.size sample))))
+ (/\= (/\each (function (_ index)
+ (\ /.mix mix n.+ 0 (/.first index sample)))
+ (/.indices (++ (/.size sample))))
(/.mixes n.+ 0 sample)))
(do random.monad
[expected random.nat
diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux
index cdb7198b5..064f1891e 100644
--- a/stdlib/source/test/lux/data/collection/queue.lux
+++ b/stdlib/source/test/lux/data/collection/queue.lux
@@ -28,7 +28,7 @@
(<| (_.covering /._)
(_.for [/.Queue])
(do {! random.monad}
- [size (\ ! map (n.% 100) random.nat)
+ [size (\ ! each (n.% 100) random.nat)
members (random.set n.hash size random.nat)
non_member (random.only (|>> (set.member? members) not)
random.nat)
@@ -88,7 +88,7 @@
has_expected_order!
(\ (list.equivalence n.equivalence) =
- (list\compose (/.list sample) (list non_member))
+ (list\composite (/.list sample) (list non_member))
(/.list pushed))]
(and size_increases!
new_member_is_identified!
diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux
index 1e199d23e..da99e408d 100644
--- a/stdlib/source/test/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/test/lux/data/collection/queue/priority.lux
@@ -31,7 +31,7 @@
(<| (_.covering /._)
(_.for [/.Queue])
(do {! random.monad}
- [size (\ ! map (n.% 100) random.nat)
+ [size (\ ! each (n.% 100) random.nat)
sample (..random size)
non_member_priority random.nat
non_member (random.only (|>> (/.member? n.equivalence sample) not)
@@ -80,7 +80,7 @@
(/.end /.min min_member)
(/.end /.max max_member)
/.front
- (maybe\map (n.= max_member))
+ (maybe\each (n.= max_member))
(maybe.else false)))
(_.cover [/.min]
(|> /.empty
@@ -88,7 +88,7 @@
(/.end /.min min_member)
/.next
/.front
- (maybe\map (n.= min_member))
+ (maybe\each (n.= min_member))
(maybe.else false)))
))
))))
diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux
index a8ff3a7ab..b5ba88171 100644
--- a/stdlib/source/test/lux/data/collection/row.lux
+++ b/stdlib/source/test/lux/data/collection/row.lux
@@ -29,7 +29,7 @@
(def: signatures
Test
(do {! random.monad}
- [size (\ ! map (n.% 100) random.nat)]
+ [size (\ ! each (n.% 100) random.nat)]
($_ _.and
(_.for [/.equivalence]
($equivalence.spec (/.equivalence n.equivalence) (random.row size random.nat)))
@@ -48,7 +48,7 @@
(def: whole
Test
(do {! random.monad}
- [size (\ ! map (n.% 100) random.nat)
+ [size (\ ! each (n.% 100) random.nat)
sample (random.set n.hash size random.nat)
.let [sample (|> sample set.list /.of_list)]
.let [(^open "/\.") (/.equivalence n.equivalence)]]
@@ -81,10 +81,10 @@
(def: index_based
Test
(do {! random.monad}
- [size (\ ! map (|>> (n.% 100) ++) random.nat)]
+ [size (\ ! each (|>> (n.% 100) ++) random.nat)]
($_ _.and
(do !
- [good_index (|> random.nat (\ ! map (n.% size)))
+ [good_index (|> random.nat (\ ! each (n.% size)))
.let [bad_index (n.+ size good_index)]
sample (random.set n.hash size random.nat)
non_member (random.only (|>> (set.member? sample) not)
@@ -134,7 +134,7 @@
(<| (_.covering /._)
(_.for [/.Row])
(do {! random.monad}
- [size (\ ! map (|>> (n.% 100) ++) random.nat)]
+ [size (\ ! each (|>> (n.% 100) ++) random.nat)]
($_ _.and
..signatures
..whole
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux
index fc67cf27d..ace5fa0cb 100644
--- a/stdlib/source/test/lux/data/collection/sequence.lux
+++ b/stdlib/source/test/lux/data/collection/sequence.lux
@@ -45,9 +45,9 @@
(let [(^open "list\.") (list.equivalence n.equivalence)])
(do {! random.monad}
[repeated random.nat
- index (\ ! map (n.% 100) random.nat)
- size (\ ! map (|>> (n.% 10) ++) random.nat)
- offset (\ ! map (n.% 100) random.nat)
+ index (\ ! each (n.% 100) random.nat)
+ size (\ ! each (|>> (n.% 10) ++) random.nat)
+ offset (\ ! each (n.% 100) random.nat)
cycle_start random.nat
cycle_next (random.list size random.nat)]
($_ _.and
@@ -94,7 +94,7 @@
(list\= (enum.range n.enum (++ offset) (n.+ size offset))
(/.first size (/.tail (..iterations ++ offset)))))
(_.cover [/.only]
- (list\= (list\map (n.* 2) (enum.range n.enum 0 (-- size)))
+ (list\= (list\each (n.* 2) (enum.range n.enum 0 (-- size)))
(/.first size (/.only n.even? (..iterations ++ 0)))))
(_.cover [/.partition]
(let [[evens odds] (/.partition n.even? (..iterations ++ 0))]
@@ -106,7 +106,7 @@
(let [(^open "/\.") /.functor
(^open "list\.") (list.equivalence text.equivalence)]
(list\= (/.first size
- (/\map %.nat (..iterations ++ offset)))
+ (/\each %.nat (..iterations ++ offset)))
(/.first size
(/.iterations (function (_ n) [(++ n) (%.nat n)])
offset)))))
diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux
index 66ecd0ca3..2ed9fb511 100644
--- a/stdlib/source/test/lux/data/collection/set.lux
+++ b/stdlib/source/test/lux/data/collection/set.lux
@@ -22,7 +22,7 @@
(def: gen_nat
(Random Nat)
- (\ random.monad map (n.% 100)
+ (\ random.monad each (n.% 100)
random.nat))
(def: .public test
@@ -36,7 +36,7 @@
($equivalence.spec /.equivalence (random.set n.hash size random.nat)))
(_.for [/.hash]
(|> random.nat
- (\ random.monad map (|>> list (/.of_list n.hash)))
+ (\ random.monad each (|>> list (/.of_list n.hash)))
($hash.spec /.hash)))
(_.for [/.monoid]
($monoid.spec /.equivalence (/.monoid n.hash) (random.set n.hash size random.nat)))
@@ -52,13 +52,13 @@
(_.cover [/.empty]
(/.empty? (/.empty n.hash)))
(do !
- [hash (\ ! map (function (_ constant)
- (: (Hash Nat)
- (implementation
- (def: &equivalence n.equivalence)
-
- (def: (hash _)
- constant))))
+ [hash (\ ! each (function (_ constant)
+ (: (Hash Nat)
+ (implementation
+ (def: &equivalence n.equivalence)
+
+ (def: (hash _)
+ constant))))
random.nat)]
(_.cover [/.member_hash]
(same? hash (/.member_hash (/.empty hash)))))
diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux
index 0afe973ef..55928932f 100644
--- a/stdlib/source/test/lux/data/collection/set/multi.lux
+++ b/stdlib/source/test/lux/data/collection/set/multi.lux
@@ -23,7 +23,7 @@
(def: count
(Random Nat)
- (\ random.monad map (|>> (n.% 10) ++) random.nat))
+ (\ random.monad each (|>> (n.% 10) ++) random.nat))
(def: .public (random size hash count element)
(All [a] (-> Nat (Hash a) (Random Nat) (Random a) (Random (/.Set a))))
@@ -39,21 +39,21 @@
(def: signature
Test
(do {! random.monad}
- [diversity (\ ! map (n.% 10) random.nat)]
+ [diversity (\ ! each (n.% 10) random.nat)]
($_ _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence (..random diversity n.hash ..count random.nat)))
(_.for [/.hash]
(|> random.nat
- (\ random.monad map (function (_ single)
- (/.has 1 single (/.empty n.hash))))
+ (\ random.monad each (function (_ single)
+ (/.has 1 single (/.empty n.hash))))
($hash.spec /.hash)))
)))
(def: composition
Test
(do {! random.monad}
- [diversity (\ ! map (n.% 10) random.nat)
+ [diversity (\ ! each (n.% 10) random.nat)
sample (..random diversity n.hash ..count random.nat)
another (..random diversity n.hash ..count random.nat)]
(`` ($_ _.and
@@ -113,12 +113,12 @@
(<| (_.covering /._)
(_.for [/.Set])
(do {! random.monad}
- [diversity (\ ! map (n.% 10) random.nat)
+ [diversity (\ ! each (n.% 10) random.nat)
sample (..random diversity n.hash ..count random.nat)
non_member (random.only (predicate.complement (set.member? (/.support sample)))
random.nat)
addition_count ..count
- partial_removal_count (\ ! map (n.% addition_count) random.nat)
+ partial_removal_count (\ ! each (n.% addition_count) random.nat)
another (..random diversity n.hash ..count random.nat)]
($_ _.and
(_.cover [/.list /.of_list]
diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux
index b753ac1af..31b8b0405 100644
--- a/stdlib/source/test/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/set/ordered.lux
@@ -21,7 +21,7 @@
(def: size
(random.Random Nat)
- (\ random.monad map (n.% 100) random.nat))
+ (\ random.monad each (n.% 100) random.nat))
(def: .public (random size &order gen_value)
(All [a] (-> Nat (Order a) (Random a) (Random (Set a))))
@@ -47,7 +47,7 @@
non_memberL (random.only (|>> (//.member? usetL) not)
random.nat)
.let [listL (//.list usetL)]
- listR (|> (random.set n.hash sizeR random.nat) (\ ! map //.list))
+ listR (|> (random.set n.hash sizeR random.nat) (\ ! each //.list))
.let [(^open "/\.") /.equivalence
setL (/.of_list n.order listL)
setR (/.of_list n.order listR)
diff --git a/stdlib/source/test/lux/data/collection/stack.lux b/stdlib/source/test/lux/data/collection/stack.lux
index 79355156f..a6aa8c1dc 100644
--- a/stdlib/source/test/lux/data/collection/stack.lux
+++ b/stdlib/source/test/lux/data/collection/stack.lux
@@ -27,7 +27,7 @@
(<| (_.covering /._)
(_.for [/.Stack])
(do random.monad
- [size (\ random.monad map (n.% 100) random.nat)
+ [size (\ random.monad each (n.% 100) random.nat)
sample (random.stack size random.nat)
expected_top random.nat]
($_ _.and
diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux
index be610c25d..d48a8d208 100644
--- a/stdlib/source/test/lux/data/collection/tree.lux
+++ b/stdlib/source/test/lux/data/collection/tree.lux
@@ -23,13 +23,13 @@
(All [a] (-> (Random a) (Random [Nat (Tree a)])))
(do {! random.monad}
[value gen_value
- num_children (\ ! map (n.% 2) random.nat)
+ num_children (\ ! each (n.% 2) random.nat)
children (random.list num_children (tree gen_value))]
(in [(|> children
- (list\map product.left)
+ (list\each product.left)
(list\mix n.+ 1))
{#/.value value
- #/.children (list\map product.right children)}])))
+ #/.children (list\each product.right children)}])))
(def: .public test
Test
@@ -38,7 +38,7 @@
($_ _.and
(_.for [/.equivalence]
(|> (..tree random.nat)
- (\ random.monad map product.right)
+ (\ random.monad each product.right)
($equivalence.spec (/.equivalence n.equivalence))))
(_.for [/.mix]
($mix.spec /.leaf /.equivalence /.mix))
@@ -58,12 +58,12 @@
(/.flat (/.leaf expected)))))
(do {! random.monad}
[value random.nat
- num_children (\ ! map (n.% 3) random.nat)
+ num_children (\ ! each (n.% 3) random.nat)
children (random.list num_children random.nat)]
(_.cover [/.branch]
(\ (list.equivalence n.equivalence) =
(list& value children)
- (/.flat (/.branch value (list\map /.leaf children))))))
+ (/.flat (/.branch value (list\each /.leaf children))))))
(do random.monad
[expected/0 random.nat
expected/1 random.nat
diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux
index 53631edbf..5ec0569bb 100644
--- a/stdlib/source/test/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/test/lux/data/collection/tree/finger.lux
@@ -45,7 +45,7 @@
(_.cover [/.tag]
(and (text\= tag_left
(/.tag (\ ..builder leaf tag_left expected_left)))
- (text\= (text\compose tag_left tag_right)
+ (text\= (text\composite tag_left tag_right)
(/.tag (\ ..builder branch
(\ ..builder leaf tag_left expected_left)
(\ ..builder leaf tag_right expected_right))))))
@@ -96,13 +96,13 @@
(let [can_find_correct_one!
(|> (\ ..builder leaf tag_left expected_left)
(/.one (text.contains? tag_left))
- (maybe\map (n.= expected_left))
+ (maybe\each (n.= expected_left))
(maybe.else false))
cannot_find_incorrect_one!
(|> (\ ..builder leaf tag_right expected_right)
(/.one (text.contains? tag_left))
- (maybe\map (n.= expected_left))
+ (maybe\each (n.= expected_left))
(maybe.else false)
not)
@@ -111,7 +111,7 @@
(\ ..builder leaf tag_left expected_left)
(\ ..builder leaf tag_right expected_right))
(/.one (text.contains? tag_left))
- (maybe\map (n.= expected_left))
+ (maybe\each (n.= expected_left))
(maybe.else false))
can_find_right!
@@ -119,7 +119,7 @@
(\ ..builder leaf tag_left expected_left)
(\ ..builder leaf tag_right expected_right))
(/.one (text.contains? tag_right))
- (maybe\map (n.= expected_right))
+ (maybe\each (n.= expected_right))
(maybe.else false))]
(and can_find_correct_one!
cannot_find_incorrect_one!
diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux
index 2b20582e9..d134be2ca 100644
--- a/stdlib/source/test/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux
@@ -163,7 +163,7 @@
(^open "list\.") (list.equivalence n.equivalence)]]
($_ _.and
(_.for [/.equivalence]
- ($equivalence.spec (/.equivalence n.equivalence) (\ ! map (|>> product.right /.zipper) (//.tree random.nat))))
+ ($equivalence.spec (/.equivalence n.equivalence) (\ ! each (|>> product.right /.zipper) (//.tree random.nat))))
(_.for [/.functor]
($functor.spec (|>> tree.leaf /.zipper) /.equivalence /.functor))
(_.for [/.comonad]
@@ -197,7 +197,7 @@
(|> sample
/.zipper
/.end
- (maybe\map /.end?)
+ (maybe\each /.end?)
(maybe.else false))))
(_.cover [/.interpose]
(let [cursor (|> (tree.branch dummy (list (tree.leaf dummy)))
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux
index 67158dc10..2665beb41 100644
--- a/stdlib/source/test/lux/data/color.lux
+++ b/stdlib/source/test/lux/data/color.lux
@@ -26,7 +26,7 @@
(def: .public random
(Random /.Color)
(|> ($_ random.and random.nat random.nat random.nat)
- (\ random.monad map /.of_rgb)))
+ (\ random.monad each /.of_rgb)))
(def: scale
(-> Nat Frac)
@@ -131,15 +131,15 @@
Test
(_.for [/.Spread /.Palette]
(do {! random.monad}
- [eH (\ ! map (|>> f.abs (f.% +0.9) (f.+ +0.05))
+ [eH (\ ! each (|>> f.abs (f.% +0.9) (f.+ +0.05))
random.safe_frac)
.let [eS +0.5]
- variations (\ ! map (|>> (n.% 3) (n.+ 2)) random.nat)
+ variations (\ ! each (|>> (n.% 3) (n.+ 2)) random.nat)
.let [max_spread (f./ (|> variations ++ .int int.frac)
+1.0)
min_spread (f./ +2.0 max_spread)
spread_space (f.- min_spread max_spread)]
- spread (\ ! map (|>> f.abs (f.% spread_space) (f.+ min_spread))
+ spread (\ ! each (|>> f.abs (f.% spread_space) (f.+ min_spread))
random.safe_frac)]
(`` ($_ _.and
(~~ (template [<brightness> <palette>]
diff --git a/stdlib/source/test/lux/data/format/binary.lux b/stdlib/source/test/lux/data/format/binary.lux
index 107d95714..842186da7 100644
--- a/stdlib/source/test/lux/data/format/binary.lux
+++ b/stdlib/source/test/lux/data/format/binary.lux
@@ -23,7 +23,7 @@
(def: random
(Random /.Specification)
- (\ random.monad map /.nat random.nat))
+ (\ random.monad each /.nat random.nat))
(def: .public test
Test
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index 9e5a03843..9b885e9de 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -36,7 +36,7 @@
(random.rec
(function (_ recur)
(do {! random.monad}
- [size (\ ! map (n.% 2) random.nat)]
+ [size (\ ! each (n.% 2) random.nat)]
($_ random.or
(\ ! in [])
random.bit
@@ -85,20 +85,20 @@
(|> expected
/.format
(\ /.codec decoded)
- (try\map (\= expected))
+ (try\each (\= expected))
(try.else false))))
(do random.monad
[keys (random.set text.hash 3 (random.ascii/alpha 1))
values (random.set frac.hash 3 random.safe_frac)
.let [expected (list.zipped/2 (set.list keys)
- (list\map (|>> #/.Number) (set.list values)))
+ (list\each (|>> #/.Number) (set.list values)))
object (/.object expected)]]
($_ _.and
(_.cover [/.object /.fields]
(case (/.fields object)
(#try.Success actual)
(\ (list.equivalence text.equivalence) =
- (list\map product.left expected)
+ (list\each product.left expected)
actual)
(#try.Failure error)
@@ -106,7 +106,7 @@
(_.cover [/.field]
(list.every? (function (_ [key expected])
(|> (/.field key object)
- (try\map (\= expected))
+ (try\each (\= expected))
(try.else false)))
expected))
))
@@ -122,7 +122,7 @@
.let [can_find_known_key!
(|> object
(/.field key)
- (try\map (\= (#/.Number expected)))
+ (try\each (\= (#/.Number expected)))
(try.else false))
cannot_find_unknown_key!
@@ -141,7 +141,7 @@
(_.cover [<type> <field>]
(|> (/.object (list [key (<tag> value)]))
(<field> key)
- (try\map (\ <equivalence> = value))
+ (try\each (\ <equivalence> = value))
(try.else false))))]
[/.Boolean /.boolean_field #/.Boolean random.bit bit.equivalence]
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index 7a84f12fd..2567d277f 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -108,8 +108,8 @@
Test
(_.for [/.Small]
(do {! random.monad}
- [expected (|> random.nat (\ ! map (n.% /.small_limit)))
- invalid (|> random.nat (\ ! map (n.max /.small_limit)))]
+ [expected (|> random.nat (\ ! each (n.% /.small_limit)))
+ invalid (|> random.nat (\ ! each (n.max /.small_limit)))]
(`` ($_ _.and
(_.cover [/.small /.from_small]
(case (/.small expected)
@@ -132,8 +132,8 @@
Test
(_.for [/.Big]
(do {! random.monad}
- [expected (|> random.nat (\ ! map (n.% /.big_limit)))
- invalid (|> random.nat (\ ! map (n.max /.big_limit)))]
+ [expected (|> random.nat (\ ! each (n.% /.big_limit)))
+ invalid (|> random.nat (\ ! each (n.max /.big_limit)))]
(`` ($_ _.and
(_.cover [/.big /.from_big]
(case (/.big expected)
@@ -158,10 +158,10 @@
Test
(do {! random.monad}
[expected_path (random.ascii/lower (-- /.path_size))
- expected_moment (\ ! map (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis)
+ expected_moment (\ ! each (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis)
random.nat)
chunk (random.ascii/lower chunk_size)
- chunks (\ ! map (n.% 100) random.nat)
+ chunks (\ ! each (n.% 100) random.nat)
.let [content (|> chunk
(list.repeated chunks)
text.together
@@ -402,11 +402,11 @@
(|> row.empty
(format.result /.writer)
(<b>.result /.parser)
- (\ try.monad map row.empty?)
+ (\ try.monad each row.empty?)
(try.else false)))
(_.cover [/.invalid_end_of_archive]
(let [dump (format.result /.writer row.empty)]
- (case (<b>.result /.parser (binary\compose dump dump))
+ (case (<b>.result /.parser (binary\composite dump dump))
(#try.Success _)
false
diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux
index 0ce833e92..0d9f9ead4 100644
--- a/stdlib/source/test/lux/data/format/xml.lux
+++ b/stdlib/source/test/lux/data/format/xml.lux
@@ -36,13 +36,13 @@
(def: char
(Random Nat)
(do {! random.monad}
- [idx (|> random.nat (\ ! map (n.% (text.size char_range))))]
+ [idx (|> random.nat (\ ! each (n.% (text.size char_range))))]
(in (maybe.trusted (text.char idx char_range)))))
(def: (size bottom top)
(-> Nat Nat (Random Nat))
(let [constraint (|>> (n.% top) (n.max bottom))]
- (random\map constraint random.nat)))
+ (random\each constraint random.nat)))
(def: (text bottom top)
(-> Nat Nat (Random Text))
diff --git a/stdlib/source/test/lux/data/name.lux b/stdlib/source/test/lux/data/name.lux
index 0a882efaf..ef4057d1c 100644
--- a/stdlib/source/test/lux/data/name.lux
+++ b/stdlib/source/test/lux/data/name.lux
@@ -30,12 +30,12 @@
(<| (_.covering /._)
(do {! random.monad}
[... First Name
- sizeM1 (|> random.nat (\ ! map (n.% 100)))
- sizeS1 (|> random.nat (\ ! map (|>> (n.% 100) (n.max 1))))
+ sizeM1 (|> random.nat (\ ! each (n.% 100)))
+ sizeS1 (|> random.nat (\ ! each (|>> (n.% 100) (n.max 1))))
(^@ name1 [module1 short1]) (..random sizeM1 sizeS1)
... Second Name
- sizeM2 (|> random.nat (\ ! map (n.% 100)))
- sizeS2 (|> random.nat (\ ! map (|>> (n.% 100) (n.max 1))))
+ sizeM2 (|> random.nat (\ ! each (n.% 100)))
+ sizeS2 (|> random.nat (\ ! each (|>> (n.% 100) (n.max 1))))
(^@ name2 [module2 short2]) (..random sizeM2 sizeS2)]
(_.for [.Name]
($_ _.and
@@ -43,7 +43,7 @@
($equivalence.spec /.equivalence (..random sizeM1 sizeS1)))
(_.for [/.hash]
(|> (random.ascii 1)
- (\ ! map (|>> [""]))
+ (\ ! each (|>> [""]))
($hash.spec /.hash)))
(_.for [/.order]
($order.spec /.order (..random sizeM1 sizeS1)))
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux
index 61b9c43a1..44588b3b6 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -23,7 +23,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (_.for [.Variant .Or])
+ (_.for [.Union .Or])
(do {! random.monad}
[expected random.nat
shift random.nat]
@@ -70,12 +70,12 @@
(/.then (n.+ shift) (n.- shift))
(case> (0 #1 actual) (n.= (n.- shift expected) actual) _ false))))
(do !
- [size (\ ! map (n.% 5) random.nat)
+ [size (\ ! each (n.% 5) random.nat)
expected (random.list size random.nat)]
($_ _.and
(_.cover [/.lefts]
(let [actual (: (List (Or Nat Nat))
- (list\map /.left expected))]
+ (list\each /.left expected))]
(and (\ (list.equivalence n.equivalence) =
expected
(/.lefts actual))
@@ -84,7 +84,7 @@
(/.rights actual)))))
(_.cover [/.rights]
(let [actual (: (List (Or Nat Nat))
- (list\map /.right expected))]
+ (list\each /.right expected))]
(and (\ (list.equivalence n.equivalence) =
expected
(/.rights actual))
@@ -93,10 +93,10 @@
(/.lefts actual)))))
(_.cover [/.partition]
(let [[lefts rights] (|> expected
- (list\map (function (_ value)
- (if (n.even? value)
- (/.left value)
- (/.right value))))
+ (list\each (function (_ value)
+ (if (n.even? value)
+ (/.left value)
+ (/.right value))))
(: (List (Or Nat Nat)))
/.partition)]
(and (\ (list.equivalence n.equivalence) =
diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux
index 832c5a094..df0c6000c 100644
--- a/stdlib/source/test/lux/data/text.lux
+++ b/stdlib/source/test/lux/data/text.lux
@@ -34,12 +34,12 @@
(def: bounded_size
(random.Random Nat)
(|> random.nat
- (\ random.monad map (|>> (n.% 20) (n.+ 1)))))
+ (\ random.monad each (|>> (n.% 20) (n.+ 1)))))
(def: size
Test
(do {! random.monad}
- [size (\ ! map (n.% 10) random.nat)
+ [size (\ ! each (n.% 10) random.nat)
sample (random.unicode size)]
($_ _.and
(_.cover [/.size]
@@ -56,7 +56,7 @@
(random.unicode 1))
left (random.unicode 1)
right (random.unicode 1)
- .let [full (\ /.monoid compose inner outer)
+ .let [full (\ /.monoid composite inner outer)
fake_index (-- 0)]]
(`` ($_ _.and
(~~ (template [<affix> <predicate>]
@@ -86,18 +86,18 @@
.let [fake_index (-- 0)]]
($_ _.and
(_.cover [/.contains?]
- (let [full (\ /.monoid compose inner outer)]
+ (let [full (\ /.monoid composite inner outer)]
(and (/.contains? inner full)
(/.contains? outer full))))
(_.cover [/.index]
- (and (|> (/.index inner (\ /.monoid compose inner outer))
+ (and (|> (/.index inner (\ /.monoid composite inner outer))
(maybe.else fake_index)
(n.= 0))
- (|> (/.index outer (\ /.monoid compose inner outer))
+ (|> (/.index outer (\ /.monoid composite inner outer))
(maybe.else fake_index)
(n.= 1))))
(_.cover [/.index']
- (let [full (\ /.monoid compose inner outer)]
+ (let [full (\ /.monoid composite inner outer)]
(and (|> (/.index' 0 inner full)
(maybe.else fake_index)
(n.= 0))
@@ -115,7 +115,7 @@
(maybe.else fake_index)
(n.= fake_index)))))
(_.cover [/.last_index]
- (let [full ($_ (\ /.monoid compose) outer inner outer)]
+ (let [full ($_ (\ /.monoid composite) outer inner outer)]
(and (|> (/.last_index inner full)
(maybe.else fake_index)
(n.= 1))
@@ -146,10 +146,10 @@
(\ /.equivalence = /.new_line /.line_feed))
)))
(do {! random.monad}
- [size (\ ! map (|>> (n.% 10) ++) random.nat)
+ [size (\ ! each (|>> (n.% 10) ++) random.nat)
characters (random.set /.hash size (random.ascii/alpha 1))
.let [sample (|> characters set.list /.together)]
- expected (\ ! map (n.% size) random.nat)]
+ expected (\ ! each (n.% size) random.nat)]
(_.cover [/.char]
(case (/.char expected sample)
(#.Some char)
@@ -178,7 +178,7 @@
(def: manipulation
Test
(do {! random.monad}
- [size (\ ! map (|>> (n.% 10) (n.+ 2)) random.nat)
+ [size (\ ! each (|>> (n.% 10) (n.+ 2)) random.nat)
characters (random.set /.hash size (random.ascii/alpha 1))
separator (random.only (|>> (set.member? characters) not)
(random.ascii/alpha 1))
@@ -206,10 +206,10 @@
(/.interposed "" (set.list characters)))))
(_.cover [/.replaced/1]
(\ /.equivalence =
- (\ /.monoid compose post static)
- (/.replaced/1 pre post (\ /.monoid compose pre static))))
+ (\ /.monoid composite post static)
+ (/.replaced/1 pre post (\ /.monoid composite pre static))))
(_.cover [/.split_by]
- (case (/.split_by static ($_ (\ /.monoid compose) pre static post))
+ (case (/.split_by static ($_ (\ /.monoid composite) pre static post))
(#.Some [left right])
(and (\ /.equivalence = pre left)
(\ /.equivalence = post right))
@@ -317,7 +317,7 @@
.let [... The wider unicode charset includes control characters that
... can make text replacement work improperly.
... Because of that, I restrict the charset.
- normal_char_gen (|> random.nat (\ ! map (|>> (n.% 128) (n.max 1))))]
+ normal_char_gen (|> random.nat (\ ! each (|>> (n.% 128) (n.max 1))))]
sep1 (random.text normal_char_gen 1)
sep2 (random.text normal_char_gen 1)
.let [part_gen (|> (random.text normal_char_gen sizeP)
diff --git a/stdlib/source/test/lux/data/text/buffer.lux b/stdlib/source/test/lux/data/text/buffer.lux
index 7d502d2fb..aa88a2ac3 100644
--- a/stdlib/source/test/lux/data/text/buffer.lux
+++ b/stdlib/source/test/lux/data/text/buffer.lux
@@ -17,7 +17,7 @@
(def: part
(Random Text)
(do {! random.monad}
- [size (\ ! map (|>> (n.% 10) ++) random.nat)]
+ [size (\ ! each (|>> (n.% 10) ++) random.nat)]
(random.ascii/alpha size)))
(def: .public test
diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux
index ca28e316d..c17b7ce36 100644
--- a/stdlib/source/test/lux/data/text/encoding.lux
+++ b/stdlib/source/test/lux/data/text/encoding.lux
@@ -214,7 +214,7 @@
(Random /.Encoding)
(let [options (list.size ..all_encodings)]
(do {! random.monad}
- [choice (\ ! map (n.% options) random.nat)]
+ [choice (\ ! each (n.% options) random.nat)]
(in (maybe.trusted (list.item choice ..all_encodings))))))
(def: .public test
diff --git a/stdlib/source/test/lux/data/text/escape.lux b/stdlib/source/test/lux/data/text/escape.lux
index 49b125cba..855064059 100644
--- a/stdlib/source/test/lux/data/text/escape.lux
+++ b/stdlib/source/test/lux/data/text/escape.lux
@@ -34,7 +34,7 @@
(def: (range max min)
(-> Char Char (Random Char))
(let [range (n.- min max)]
- (\ random.monad map
+ (\ random.monad each
(|>> (n.% range) (n.+ min))
random.nat)))
@@ -114,7 +114,7 @@
(text\= expected (/.escaped expected))))))
(do {! random.monad}
[dummy (|> (random.char unicode.character)
- (\ ! map text.of_char))]
+ (\ ! each text.of_char))]
(_.cover [/.dangling_escape]
(case (/.un_escaped (format (/.escaped dummy) "\"))
(#try.Success _)
@@ -125,7 +125,7 @@
(do {! random.monad}
[dummy (|> (random.char unicode.character)
(random.only (|>> (set.member? ..valid_sigils) not))
- (\ ! map text.of_char))]
+ (\ ! each text.of_char))]
(_.cover [/.invalid_escape]
(case (/.un_escaped (format "\" dummy))
(#try.Success _)
@@ -135,7 +135,7 @@
(exception.match? /.invalid_escape error))))
(do {! random.monad}
[too_short (|> (random.char unicode.character)
- (\ ! map (n.% (hex "1000"))))
+ (\ ! each (n.% (hex "1000"))))
code (|> (random.unicode 4)
(random.only (function (_ code)
(case (\ n.hex decoded code)
diff --git a/stdlib/source/test/lux/data/text/format.lux b/stdlib/source/test/lux/data/text/format.lux
index cbeedd65a..5f604f1f8 100644
--- a/stdlib/source/test/lux/data/text/format.lux
+++ b/stdlib/source/test/lux/data/text/format.lux
@@ -159,7 +159,7 @@
(_.cover [/.list]
(text\= (/.list /.nat members)
(|> members
- (list\map /.nat)
+ (list\each /.nat)
(text.interposed " ")
list
(/.list (|>>))))))
@@ -177,7 +177,7 @@
[modulus (random.one (|>> modulus.modulus
try.maybe)
random.int)
- sample (\ ! map (modular.modular modulus)
+ sample (\ ! each (modular.modular modulus)
random.int)]
(_.cover [/.mod]
(text\= (\ (modular.codec modulus) encoded sample)
diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux
index 926a56446..3c006d6d8 100644
--- a/stdlib/source/test/lux/data/text/unicode/block.lux
+++ b/stdlib/source/test/lux/data/text/unicode/block.lux
@@ -25,8 +25,8 @@
(def: .public random
(Random /.Block)
(do {! random.monad}
- [start (\ ! map (n.% 1,000,000) random.nat)
- additional (\ ! map (n.% 1,000,000) random.nat)]
+ [start (\ ! each (n.% 1,000,000) random.nat)
+ additional (\ ! each (n.% 1,000,000) random.nat)]
(in (/.block start additional))))
(with_expansions [<blocks> (as_is [blocks/0
@@ -173,12 +173,12 @@
[.let [top_start (hex "AC00")
top_end (hex "D7AF")
end_range (n.- top_start top_end)]
- start (\ ! map (|>> (n.% top_start) ++) random.nat)
- end (\ ! map (|>> (n.% end_range) (n.+ top_start)) random.nat)
+ start (\ ! each (|>> (n.% top_start) ++) random.nat)
+ end (\ ! each (|>> (n.% end_range) (n.+ top_start)) random.nat)
.let [additional (n.- start end)
sample (/.block start additional)
size (/.size sample)]
- inside (\ ! map
+ inside (\ ! each
(|>> (n.% size)
(n.+ (/.start sample)))
random.nat)]
diff --git a/stdlib/source/test/lux/data/text/unicode/set.lux b/stdlib/source/test/lux/data/text/unicode/set.lux
index b0be9c914..2ff6ade86 100644
--- a/stdlib/source/test/lux/data/text/unicode/set.lux
+++ b/stdlib/source/test/lux/data/text/unicode/set.lux
@@ -36,7 +36,7 @@
(_.for [/.Set])
(do {! random.monad}
[block //block.random
- inside (\ ! map
+ inside (\ ! each
(|>> (n.% (block.size block))
(n.+ (block.start block)))
random.nat)
diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux
index 151dd34c2..af3363bac 100644
--- a/stdlib/source/test/lux/debug.lux
+++ b/stdlib/source/test/lux/debug.lux
@@ -59,7 +59,7 @@
sample_rev random.rev]
(in (`` (and (~~ (template [<type> <format> <sample>]
[(|> (/.representation <type> <sample>)
- (try\map (text\= (<format> <sample>)))
+ (try\each (text\= (<format> <sample>)))
(try.else false))]
[Bit %.bit sample_bit]
@@ -92,7 +92,7 @@
... [(|> (/.representation (type (Or Bit Int Frac))
... (: (Or Bit Int Frac)
... (<lefts> <right?> <value>)))
- ... (try\map (text\= (format "(" (%.nat <lefts>)
+ ... (try\each (text\= (format "(" (%.nat <lefts>)
... " " (%.bit <right?>)
... " " (<format> <value>) ")")))
... (try.else false))]
@@ -115,7 +115,7 @@
sample_json $//json.random]
(in (`` (and (~~ (template [<type> <format> <sample>]
[(|> (/.representation <type> <sample>)
- (try\map (text\= (<format> <sample>)))
+ (try\each (text\= (<format> <sample>)))
(try.else false))]
[Ratio %.ratio sample_ratio]
@@ -138,7 +138,7 @@
sample_day random.day]
(in (`` (and (~~ (template [<type> <format> <sample>]
[(|> (/.representation <type> <sample>)
- (try\map (text\= (<format> <sample>)))
+ (try\each (text\= (<format> <sample>)))
(try.else false))]
[Instant %.instant sample_instant]
@@ -169,14 +169,14 @@
can_represent_time_types!
(|> (/.representation .Any sample_frac)
- (try\map (text\= "[]"))
+ (try\each (text\= "[]"))
(try.else false))
(|> (/.representation (type (List Nat)) (: (List Nat) (list sample_nat)))
- (try\map (text\= (%.list %.nat (list sample_nat))))
+ (try\each (text\= (%.list %.nat (list sample_nat))))
(try.else false))
(~~ (template [<sample>]
[(|> (/.representation (type (Maybe Nat)) (: (Maybe Nat) <sample>))
- (try\map (text\= (%.maybe %.nat <sample>)))
+ (try\each (text\= (%.maybe %.nat <sample>)))
(try.else false))]
[(#.Some sample_nat)]
@@ -210,7 +210,7 @@
))
(text\= (|> (list sample_bit sample_int sample_frac sample_text)
(: (List Any))
- (list\map /.inspection)
+ (list\each /.inspection)
(text.interposed " ")
(text.enclosed ["[" "]"]))
(/.inspection [sample_bit sample_int sample_frac sample_text]))
diff --git a/stdlib/source/test/lux/documentation.lux b/stdlib/source/test/lux/documentation.lux
index bf7c312c9..b35ff1fb7 100644
--- a/stdlib/source/test/lux/documentation.lux
+++ b/stdlib/source/test/lux/documentation.lux
@@ -30,7 +30,7 @@
(#try.Failure "OOPS!"))))
(syntax: (description [])
- (\ meta.monad map
+ (\ meta.monad each
(|>> %.nat code.text list)
meta.seed))
diff --git a/stdlib/source/test/lux/extension.lux b/stdlib/source/test/lux/extension.lux
index 68a945f9c..b83b83e11 100644
--- a/stdlib/source/test/lux/extension.lux
+++ b/stdlib/source/test/lux/extension.lux
@@ -63,8 +63,8 @@
(analysis: (..my_synthesis self phase archive [parameters (<>.some <code>.any)])
(let [! phase.monad]
(|> parameters
- (monad.map ! (phase archive))
- (\ ! map (|>> (#analysis.Extension self))))))
+ (monad.each ! (phase archive))
+ (\ ! each (|>> (#analysis.Extension self))))))
(synthesis: (..my_synthesis self phase archive [pass_through <analysis>.any])
(phase archive pass_through))
@@ -73,18 +73,18 @@
(analysis: (..my_generation self phase archive [parameters (<>.some <code>.any)])
(let [! phase.monad]
(|> parameters
- (monad.map ! (phase archive))
- (\ ! map (|>> (#analysis.Extension self))))))
+ (monad.each ! (phase archive))
+ (\ ! each (|>> (#analysis.Extension self))))))
(synthesis: (..my_generation self phase archive [parameters (<>.some <analysis>.any)])
(let [! phase.monad]
(|> parameters
- (monad.map ! (phase archive))
- (\ ! map (|>> (#synthesis.Extension self))))))
+ (monad.each ! (phase archive))
+ (\ ! each (|>> (#synthesis.Extension self))))))
(generation: (..my_generation self phase archive [pass_through <synthesis>.any])
(for {@.jvm
- (\ phase.monad map (|>> #jvm.Embedded row.row)
+ (\ phase.monad each (|>> #jvm.Embedded row.row)
(phase archive pass_through))}
(phase archive pass_through)))
diff --git a/stdlib/source/test/lux/ffi.js.lux b/stdlib/source/test/lux/ffi.js.lux
index 6e41aef82..230fad9a9 100644
--- a/stdlib/source/test/lux/ffi.js.lux
+++ b/stdlib/source/test/lux/ffi.js.lux
@@ -46,11 +46,11 @@
Test
(do {! random.monad}
[boolean random.bit
- number (\ ! map (|>> (nat.% 100) nat.frac) random.nat)
+ number (\ ! each (|>> (nat.% 100) nat.frac) random.nat)
string (random.ascii 5)
- function (\ ! map (function (_ shift)
- (: (-> Nat Nat)
- (nat.+ shift)))
+ function (\ ! each (function (_ shift)
+ (: (-> Nat Nat)
+ (nat.+ shift)))
random.nat)
... I64s get compiled as JavaScript objects with a specific structure.
object random.nat]
diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux
index 41a794c4e..e130626de 100644
--- a/stdlib/source/test/lux/ffi.jvm.lux
+++ b/stdlib/source/test/lux/ffi.jvm.lux
@@ -71,13 +71,13 @@
(def: for_conversions
Test
(do {! random.monad}
- [long (\ ! map (|>> (:as /.Long)) random.int)
- integer (\ ! map (|>> (:as /.Long) /.long_to_int) random.int)
- byte (\ ! map (|>> (:as /.Long) /.long_to_byte) random.int)
- short (\ ! map (|>> (:as /.Long) /.long_to_short) random.int)
+ [long (\ ! each (|>> (:as /.Long)) random.int)
+ integer (\ ! each (|>> (:as /.Long) /.long_to_int) random.int)
+ byte (\ ! each (|>> (:as /.Long) /.long_to_byte) random.int)
+ short (\ ! each (|>> (:as /.Long) /.long_to_short) random.int)
float (|> random.frac
(random.only (|>> f.not_a_number? not))
- (\ ! map (|>> (:as /.Double) /.double_to_float)))]
+ (\ ! each (|>> (:as /.Double) /.double_to_float)))]
(`` ($_ _.and
(~~ (template [<sample> <=> <to> <from>]
[(_.cover [<to> <from>]
@@ -106,9 +106,9 @@
(def: for_arrays
Test
(do {! random.monad}
- [size (|> random.nat (\ ! map (|>> (n.% 100) (n.max 1))))
- idx (|> random.nat (\ ! map (n.% size)))
- value (\ ! map (|>> (:as java/lang/Long)) random.int)]
+ [size (|> random.nat (\ ! each (|>> (n.% 100) (n.max 1))))
+ idx (|> random.nat (\ ! each (n.% size)))
+ value (\ ! each (|>> (:as java/lang/Long)) random.int)]
($_ _.and
(_.cover [/.array /.length]
(|> size
@@ -132,21 +132,21 @@
(def: for_miscellaneous
Test
(`` (do {! random.monad}
- [sample (\ ! map (|>> (:as java/lang/Object))
+ [sample (\ ! each (|>> (:as java/lang/Object))
(random.ascii 1))
- boolean (\ ! map (|>> (:as /.Boolean)) random.bit)
- byte (\ ! map (|>> (:as /.Long) /.long_to_byte) random.int)
- short (\ ! map (|>> (:as /.Long) /.long_to_short) random.int)
- integer (\ ! map (|>> (:as /.Long) /.long_to_int) random.int)
- long (\ ! map (|>> (:as /.Long)) random.int)
+ boolean (\ ! each (|>> (:as /.Boolean)) random.bit)
+ byte (\ ! each (|>> (:as /.Long) /.long_to_byte) random.int)
+ short (\ ! each (|>> (:as /.Long) /.long_to_short) random.int)
+ integer (\ ! each (|>> (:as /.Long) /.long_to_int) random.int)
+ long (\ ! each (|>> (:as /.Long)) random.int)
float (|> random.frac
(random.only (|>> f.not_a_number? not))
- (\ ! map (|>> (:as /.Double) /.double_to_float)))
+ (\ ! each (|>> (:as /.Double) /.double_to_float)))
double (|> random.frac
(random.only (|>> f.not_a_number? not))
- (\ ! map (|>> (:as /.Double))))
- character (\ ! map (|>> (:as /.Long) /.long_to_int /.int_to_char) random.int)
- string (\ ! map (|>> (:as java/lang/String))
+ (\ ! each (|>> (:as /.Double))))
+ character (\ ! each (|>> (:as /.Long) /.long_to_int /.int_to_char) random.int)
+ string (\ ! each (|>> (:as java/lang/String))
(random.ascii 1))]
($_ _.and
(_.cover [/.check]
@@ -546,7 +546,7 @@
(test/TestInterface4::actual4 left right right object/8)))]
.let [random_long (: (Random java/lang/Long)
- (\ ! map (|>> (:as java/lang/Long))
+ (\ ! each (|>> (:as java/lang/Long))
random.int))]
dummy/0 random_long
dummy/1 random_long
diff --git a/stdlib/source/test/lux/ffi.old.lux b/stdlib/source/test/lux/ffi.old.lux
index 701828389..22c0a636a 100644
--- a/stdlib/source/test/lux/ffi.old.lux
+++ b/stdlib/source/test/lux/ffi.old.lux
@@ -89,13 +89,13 @@
Test
(do {! random.monad}
[long random.int
- int (\ ! map (|>> /.long_to_int) random.int)
- char (\ ! map (|>> /.long_to_int /.int_to_char) random.int)
+ int (\ ! each (|>> /.long_to_int) random.int)
+ char (\ ! each (|>> /.long_to_int /.int_to_char) random.int)
double (|> random.frac
(random.only (|>> f.not_a_number? not)))
float (|> random.frac
(random.only (|>> f.not_a_number? not))
- (\ ! map (|>> /.double_to_float)))]
+ (\ ! each (|>> /.double_to_float)))]
(`` ($_ _.and
(~~ (template [<=> <sample> <to> <from>]
[(_.cover [<to> <from>]
@@ -156,8 +156,8 @@
(def: arrays
Test
(do {! random.monad}
- [size (|> random.nat (\ ! map (|>> (n.% 100) (n.max 1))))
- idx (|> random.nat (\ ! map (n.% size)))
+ [size (|> random.nat (\ ! each (|>> (n.% 100) (n.max 1))))
+ idx (|> random.nat (\ ! each (n.% size)))
value random.int]
($_ _.and
(_.cover [/.array /.length]
diff --git a/stdlib/source/test/lux/locale.lux b/stdlib/source/test/lux/locale.lux
index afc69ea50..3c37647aa 100644
--- a/stdlib/source/test/lux/locale.lux
+++ b/stdlib/source/test/lux/locale.lux
@@ -59,16 +59,16 @@
fixed_encoding ..random_encoding]
($_ _.and
(|> ..random_language
- (\ ! map (function (_ language)
- (/.locale language (#.Some fixed_territory) (#.Some fixed_encoding))))
+ (\ ! each (function (_ language)
+ (/.locale language (#.Some fixed_territory) (#.Some fixed_encoding))))
($hash.spec /.hash))
(|> ..random_territory
- (\ ! map (function (_ territory)
- (/.locale fixed_language (#.Some territory) (#.Some fixed_encoding))))
+ (\ ! each (function (_ territory)
+ (/.locale fixed_language (#.Some territory) (#.Some fixed_encoding))))
($hash.spec /.hash))
(|> ..random_encoding
- (\ ! map (function (_ encoding)
- (/.locale fixed_language (#.Some fixed_territory) (#.Some encoding))))
+ (\ ! each (function (_ encoding)
+ (/.locale fixed_language (#.Some fixed_territory) (#.Some encoding))))
($hash.spec /.hash))
)))
diff --git a/stdlib/source/test/lux/locale/language.lux b/stdlib/source/test/lux/locale/language.lux
index b8ac893fd..19883a827 100644
--- a/stdlib/source/test/lux/locale/language.lux
+++ b/stdlib/source/test/lux/locale/language.lux
@@ -24,11 +24,12 @@
["." /]])
(type: Bundle
- {#amount Nat
- #names (Set Text)
- #codes (Set Text)
- #languages (Set /.Language)
- #test Test})
+ (Record
+ {#amount Nat
+ #names (Set Text)
+ #codes (Set Text)
+ #languages (Set /.Language)
+ #test Test}))
(template [<bundle> <languages>]
[(def: <bundle>
@@ -37,8 +38,8 @@
languages (: (List /.Language)
(`` (list (~~ (template.spliced <languages>)))))]
{#amount amount
- #names (|> languages (list\map /.name) (set.of_list text.hash))
- #codes (|> languages (list\map /.code) (set.of_list text.hash))
+ #names (|> languages (list\each /.name) (set.of_list text.hash))
+ #codes (|> languages (list\each /.code) (set.of_list text.hash))
#languages (set.of_list /.hash languages)
#test (_.cover <languages>
true)}))]
@@ -198,7 +199,7 @@
Test
(|> ..languages
list.reversed
- (list\map (value@ #test))
+ (list\each (value@ #test))
(list\mix _.and
(`` ($_ _.and
(~~ (template [<lens> <tag> <hash>]
@@ -278,10 +279,10 @@
(def: .public random
(Random /.Language)
(let [options (|> ..languages
- (list\map (|>> (value@ #languages) set.list))
+ (list\each (|>> (value@ #languages) set.list))
list.together)]
(do {! random.monad}
- [choice (\ ! map (n.% (list.size options))
+ [choice (\ ! each (n.% (list.size options))
random.nat)]
(in (maybe.trusted (list.item choice options))))))
diff --git a/stdlib/source/test/lux/locale/territory.lux b/stdlib/source/test/lux/locale/territory.lux
index b8a36d4fd..2a225a58e 100644
--- a/stdlib/source/test/lux/locale/territory.lux
+++ b/stdlib/source/test/lux/locale/territory.lux
@@ -24,13 +24,14 @@
["." /]])
(type: Bundle
- {#amount Nat
- #names (Set Text)
- #shorts (Set Text)
- #longs (Set Text)
- #numbers (Set Nat)
- #territories (Set /.Territory)
- #test Test})
+ (Record
+ {#amount Nat
+ #names (Set Text)
+ #shorts (Set Text)
+ #longs (Set Text)
+ #numbers (Set Nat)
+ #territories (Set /.Territory)
+ #test Test}))
(template [<bundle> <territories>]
[(def: <bundle>
@@ -38,10 +39,10 @@
(let [amount (template.amount <territories>)
territories (`` (list (~~ (template.spliced <territories>))))]
{#amount amount
- #names (|> territories (list\map /.name) (set.of_list text.hash))
- #shorts (|> territories (list\map /.short_code) (set.of_list text.hash))
- #longs (|> territories (list\map /.long_code) (set.of_list text.hash))
- #numbers (|> territories (list\map /.numeric_code) (set.of_list n.hash))
+ #names (|> territories (list\each /.name) (set.of_list text.hash))
+ #shorts (|> territories (list\each /.short_code) (set.of_list text.hash))
+ #longs (|> territories (list\each /.long_code) (set.of_list text.hash))
+ #numbers (|> territories (list\each /.numeric_code) (set.of_list n.hash))
#territories (|> territories (set.of_list /.hash))
#test (_.cover <territories>
true)}))]
@@ -153,7 +154,7 @@
Test
(|> ..territories
list.reversed
- (list\map (value@ #test))
+ (list\each (value@ #test))
(list\mix _.and
(`` ($_ _.and
(~~ (template [<lens> <tag> <hash>]
@@ -204,10 +205,10 @@
(def: .public random
(Random /.Territory)
(let [options (|> ..territories
- (list\map (|>> (value@ #territories) set.list))
+ (list\each (|>> (value@ #territories) set.list))
list.together)]
(do {! random.monad}
- [choice (\ ! map (n.% (list.size options))
+ [choice (\ ! each (n.% (list.size options))
random.nat)]
(in (maybe.trusted (list.item choice options))))))
diff --git a/stdlib/source/test/lux/macro.lux b/stdlib/source/test/lux/macro.lux
index a335aa996..2e8c199b4 100644
--- a/stdlib/source/test/lux/macro.lux
+++ b/stdlib/source/test/lux/macro.lux
@@ -111,9 +111,9 @@
(do {! random.monad}
[[seed identifier_prefix lux] ..random_lux
- pow/1 (\ ! map code.nat random.nat)
+ pow/1 (\ ! each code.nat random.nat)
- repetitions (\ ! map (nat.% 10) random.nat)
+ repetitions (\ ! each (nat.% 10) random.nat)
.let [single_expansion (` (..pow/2 (..pow/2 (~ pow/1))))
expansion (` (nat.* (..pow/2 (~ pow/1))
(..pow/2 (~ pow/1))))
@@ -124,18 +124,18 @@
[(_.cover [<expander>]
(|> (<expander> (` (..pow/4 (~ pow/1))))
(meta.result lux)
- (try\map (\ (list.equivalence code.equivalence) =
- (list <expansion>)))
+ (try\each (\ (list.equivalence code.equivalence) =
+ (list <expansion>)))
(try.else false)))
(_.cover [<logger>]
(and (|> (/.single_expansion (` (<logger> (~' #omit) (..pow/4 (~ pow/1)))))
(meta.result lux)
- (try\map (\ (list.equivalence code.equivalence) = (list)))
+ (try\each (\ (list.equivalence code.equivalence) = (list)))
(try.else false))
(|> (/.single_expansion (` (<logger> (..pow/4 (~ pow/1)))))
(meta.result lux)
- (try\map (\ (list.equivalence code.equivalence) = (list <expansion>)))
+ (try\each (\ (list.equivalence code.equivalence) = (list <expansion>)))
(try.else false))))]
[/.single_expansion /.log_single_expansion! single_expansion]
@@ -158,7 +158,7 @@
($_ _.and
(_.cover [/.identifier]
(|> (/.identifier identifier_prefix)
- (\ meta.monad map %.code)
+ (\ meta.monad each %.code)
(meta.result lux)
(!expect (^multi (#try.Success actual_identifier)
(and (text.contains? identifier_prefix actual_identifier)
diff --git a/stdlib/source/test/lux/macro/code.lux b/stdlib/source/test/lux/macro/code.lux
index d0bd1343a..666e8734c 100644
--- a/stdlib/source/test/lux/macro/code.lux
+++ b/stdlib/source/test/lux/macro/code.lux
@@ -38,13 +38,13 @@
(def: (random_sequence random)
(All [a] (-> (Random a) (Random (List a))))
(do {! random.monad}
- [size (|> random.nat (\ ! map (n.% 3)))]
+ [size (|> random.nat (\ ! each (n.% 3)))]
(random.list size random)))
(def: (random_record random)
(All [a] (-> (Random a) (Random (List [a a]))))
(do {! random.monad}
- [size (|> random.nat (\ ! map (n.% 3)))]
+ [size (|> random.nat (\ ! each (n.% 3)))]
(random.list size (random.and random random))))
(def: .public random
@@ -52,17 +52,17 @@
(random.rec
(function (_ random)
($_ random.either
- (random\map /.bit random.bit)
- (random\map /.nat random.nat)
- (random\map /.int random.int)
- (random\map /.rev random.rev)
- (random\map /.frac random.safe_frac)
- (random\map /.text ..random_text)
- (random\map /.identifier ..random_name)
- (random\map /.tag ..random_name)
- (random\map /.form (..random_sequence random))
- (random\map /.tuple (..random_sequence random))
- (random\map /.record (..random_record random))
+ (random\each /.bit random.bit)
+ (random\each /.nat random.nat)
+ (random\each /.int random.int)
+ (random\each /.rev random.rev)
+ (random\each /.frac random.safe_frac)
+ (random\each /.text ..random_text)
+ (random\each /.identifier ..random_name)
+ (random\each /.tag ..random_name)
+ (random\each /.form (..random_sequence random))
+ (random\each /.tuple (..random_sequence random))
+ (random\each /.record (..random_record random))
))))
(def: (read source_code)
@@ -87,29 +87,29 @@
(function (_ to_code)
(do {! random.monad}
[parts (..random_sequence replacement_simulation)]
- (in [(to_code (list\map product.left parts))
- (to_code (list\map product.right parts))]))))]
+ (in [(to_code (list\each product.left parts))
+ (to_code (list\each product.right parts))]))))]
($_ random.either
(random\in [original substitute])
(do {! random.monad}
[sample (random.only (|>> (\ /.equivalence = original) not)
($_ random.either
- (random\map /.bit random.bit)
- (random\map /.nat random.nat)
- (random\map /.int random.int)
- (random\map /.rev random.rev)
- (random\map /.frac random.safe_frac)
- (random\map /.text ..random_text)
- (random\map /.identifier ..random_name)
- (random\map /.tag ..random_name)))]
+ (random\each /.bit random.bit)
+ (random\each /.nat random.nat)
+ (random\each /.int random.int)
+ (random\each /.rev random.rev)
+ (random\each /.frac random.safe_frac)
+ (random\each /.text ..random_text)
+ (random\each /.identifier ..random_name)
+ (random\each /.tag ..random_name)))]
(in [sample sample]))
(for_sequence /.form)
(for_sequence /.tuple)
(do {! random.monad}
[parts (..random_sequence replacement_simulation)]
- (in [(/.record (let [parts' (list\map product.left parts)]
+ (in [(/.record (let [parts' (list\each product.left parts)]
(list.zipped/2 parts' parts')))
- (/.record (let [parts' (list\map product.right parts)]
+ (/.record (let [parts' (list\each product.right parts)]
(list.zipped/2 parts' parts')))]))
)))))
diff --git a/stdlib/source/test/lux/macro/syntax/annotations.lux b/stdlib/source/test/lux/macro/syntax/annotations.lux
index 3fd71b7a3..bfe3bde4b 100644
--- a/stdlib/source/test/lux/macro/syntax/annotations.lux
+++ b/stdlib/source/test/lux/macro/syntax/annotations.lux
@@ -27,7 +27,7 @@
(let [word (random.ascii/alpha 10)
tag (random.and word word)]
(do {! random.monad}
- [size (\ ! map (n.% 10) random.nat)]
+ [size (\ ! each (n.% 10) random.nat)]
(random.list size (random.and tag $///code.random)))))
(def: .public test
diff --git a/stdlib/source/test/lux/macro/syntax/declaration.lux b/stdlib/source/test/lux/macro/syntax/declaration.lux
index 8301899bd..8812f0509 100644
--- a/stdlib/source/test/lux/macro/syntax/declaration.lux
+++ b/stdlib/source/test/lux/macro/syntax/declaration.lux
@@ -23,7 +23,7 @@
($_ random.and
word
(do {! random.monad}
- [size (\ ! map (n.% 10) random.nat)]
+ [size (\ ! each (n.% 10) random.nat)]
(random.list size word))
)))
diff --git a/stdlib/source/test/lux/macro/syntax/export.lux b/stdlib/source/test/lux/macro/syntax/export.lux
index 1653dc4b4..5455656c0 100644
--- a/stdlib/source/test/lux/macro/syntax/export.lux
+++ b/stdlib/source/test/lux/macro/syntax/export.lux
@@ -22,7 +22,7 @@
(Random [(Maybe Code) Nat])
($_ random.and
(|> random.bit
- (\ random.monad map code.bit)
+ (\ random.monad each code.bit)
random.maybe)
random.nat))
@@ -39,9 +39,9 @@
#.None
(list (code.nat expected_un_exported)))
(<code>.result (/.parser <code>.nat))
- (try\map (function (_ [actual_export_policy actual_un_exported])
- (|> expected_export_policy
- (maybe.else /.default_policy)
- (code\= actual_export_policy)
- (and (n.= expected_un_exported actual_un_exported)))))
+ (try\each (function (_ [actual_export_policy actual_un_exported])
+ (|> expected_export_policy
+ (maybe.else /.default_policy)
+ (code\= actual_export_policy)
+ (and (n.= expected_un_exported actual_un_exported)))))
(try.else false))))))
diff --git a/stdlib/source/test/lux/macro/syntax/type/variable.lux b/stdlib/source/test/lux/macro/syntax/type/variable.lux
index cf8d65157..125f02c19 100644
--- a/stdlib/source/test/lux/macro/syntax/type/variable.lux
+++ b/stdlib/source/test/lux/macro/syntax/type/variable.lux
@@ -32,6 +32,6 @@
(_.cover [/.format /.parser]
(|> (list (/.format expected))
(<code>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false))))
)))
diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux
index 8aeb528f5..da5cfd057 100644
--- a/stdlib/source/test/lux/math.lux
+++ b/stdlib/source/test/lux/math.lux
@@ -37,7 +37,7 @@
($_ _.and
(do {! random.monad}
[.let [~= (f.approximately? ..margin_of_error)]
- angle (|> random.safe_frac (\ ! map (f.* /.tau)))]
+ angle (|> random.safe_frac (\ ! each (f.* /.tau)))]
($_ _.and
(_.cover [/.sin /.asin]
(trigonometric_symmetry /.sin /.asin angle))
@@ -61,7 +61,7 @@
(~= (f./ +2.0 /.tau) /.pi))
))
(do {! random.monad}
- [sample (|> random.safe_frac (\ ! map (f.* +1000.0)))]
+ [sample (|> random.safe_frac (\ ! each (f.* +1000.0)))]
($_ _.and
(_.cover [/.ceil]
(let [ceil'd (/.ceil sample)]
@@ -91,8 +91,8 @@
))
(do {! random.monad}
[.let [~= (f.approximately? ..margin_of_error)]
- sample (\ ! map (f.* +10.0) random.safe_frac)
- power (\ ! map (|>> (n.% 10) ++ n.frac) random.nat)]
+ sample (\ ! each (f.* +10.0) random.safe_frac)
+ power (\ ! each (|>> (n.% 10) ++ n.frac) random.nat)]
($_ _.and
(_.cover [/.exp /.log]
(|> sample /.exp /.log (f.approximately? +0.000000000000001 sample)))
@@ -107,9 +107,9 @@
))
(do {! random.monad}
[.let [~= (f.approximately? ..margin_of_error)]
- angle (\ ! map (f.* /.tau) random.safe_frac)
- sample (\ ! map f.abs random.safe_frac)
- big (\ ! map (f.* +1,000,000,000.00) random.safe_frac)]
+ angle (\ ! each (f.* /.tau) random.safe_frac)
+ sample (\ ! each f.abs random.safe_frac)
+ big (\ ! each (f.* +1,000,000,000.00) random.safe_frac)]
(template.let [(odd! <function>)
[(_.cover [<function>]
(~= (f.opposite (<function> angle))
@@ -137,8 +137,8 @@
(inverse! /.atanh /.acoth big)
)))
(do {! random.monad}
- [x (\ ! map (|>> (f.* +10.0) f.abs) random.safe_frac)
- y (\ ! map (|>> (f.* +10.0) f.abs) random.safe_frac)]
+ [x (\ ! each (|>> (f.* +10.0) f.abs) random.safe_frac)
+ y (\ ! each (|>> (f.* +10.0) f.abs) random.safe_frac)]
(_.cover [/.hypotenuse]
(let [h (/.hypotenuse x y)]
(and (f.>= x h)
@@ -146,8 +146,8 @@
(do {! random.monad}
[.let [~= (f.approximately? ..margin_of_error)
tau/4 (f./ +4.0 /.tau)]
- x (\ ! map (f.* tau/4) random.safe_frac)
- y (\ ! map (f.* tau/4) random.safe_frac)]
+ x (\ ! each (f.* tau/4) random.safe_frac)
+ y (\ ! each (f.* tau/4) random.safe_frac)]
(_.cover [/.atan/2]
(let [expected (/.atan/2 x y)
actual (if (f.> +0.0 x)
@@ -160,7 +160,7 @@
(~= (f.opposite tau/4) (/.atan/2 +0.0 (f.opposite (f.abs y))))
(f.not_a_number? (/.atan/2 +0.0 +0.0))))))
(do {! random.monad}
- [of (\ ! map (|>> (n.% 10) ++) random.nat)]
+ [of (\ ! each (|>> (n.% 10) ++) random.nat)]
(_.cover [/.factorial]
(and (n.= 1 (/.factorial 0))
(|> (/.factorial of) (n.% of) (n.= 0)))))
diff --git a/stdlib/source/test/lux/math/logic/fuzzy.lux b/stdlib/source/test/lux/math/logic/fuzzy.lux
index 4b1a6919a..d8198d026 100644
--- a/stdlib/source/test/lux/math/logic/fuzzy.lux
+++ b/stdlib/source/test/lux/math/logic/fuzzy.lux
@@ -39,9 +39,9 @@
(do {! random.monad}
[sample random.rev
- threshold_0 (\ ! map (r.% .5)
+ threshold_0 (\ ! each (r.% .5)
random.rev)
- threshold_1 (\ ! map (|>> (r.% .5) (r.+ .5))
+ threshold_1 (\ ! each (|>> (r.% .5) (r.+ .5))
random.rev)
.let [bottom (r.min threshold_0 threshold_1)
@@ -89,7 +89,7 @@
[bottom middle_bottom middle_top top]
(|> random.rev
(random.set r.hash 4)
- (\ ! map (|>> set.list (list.sorted r.<)))
+ (\ ! each (|>> set.list (list.sorted r.<)))
(random.one (function (_ thresholds)
(case thresholds
(^ (list threshold_0 threshold_1 threshold_2 threshold_3))
@@ -173,7 +173,7 @@
[bottom middle_bottom middle_top top]
(|> random.rev
(random.set r.hash 4)
- (\ ! map (|>> set.list (list.sorted r.<)))
+ (\ ! each (|>> set.list (list.sorted r.<)))
(random.one (function (_ thresholds)
(case thresholds
(^ (list threshold_0 threshold_1 threshold_2 threshold_3))
diff --git a/stdlib/source/test/lux/math/modular.lux b/stdlib/source/test/lux/math/modular.lux
index ce10c6ca2..8d4e69ab7 100644
--- a/stdlib/source/test/lux/math/modular.lux
+++ b/stdlib/source/test/lux/math/modular.lux
@@ -30,7 +30,7 @@
(def: .public (random modulus)
(All [%] (-> (//.Modulus %) (Random (/.Mod %))))
- (\ random.monad map
+ (\ random.monad each
(/.modular modulus)
random.int))
@@ -52,8 +52,8 @@
($equivalence.spec /.equivalence (..random subject\\%)))
(_.for [/.order /.<]
($order.spec /.order (..random subject\\%)))
- (~~ (template [<compose> <monoid>]
- [(_.for [<monoid> <compose>]
+ (~~ (template [<composite> <monoid>]
+ [(_.for [<monoid> <composite>]
($monoid.spec /.equivalence (<monoid> subject\\%) (..random subject\\%)))]
[/.+ /.addition]
diff --git a/stdlib/source/test/lux/math/modulus.lux b/stdlib/source/test/lux/math/modulus.lux
index ae3bbb8e1..54ceeac1d 100644
--- a/stdlib/source/test/lux/math/modulus.lux
+++ b/stdlib/source/test/lux/math/modulus.lux
@@ -28,7 +28,7 @@
(def: .public (random range)
(Ex [%] (-> Int (Random (/.Modulus %))))
(|> random.int
- (\ random.monad map (i.% range))
+ (\ random.monad each (i.% range))
(random.one (|>> /.modulus try.maybe))))
(def: .public test
diff --git a/stdlib/source/test/lux/math/number/complex.lux b/stdlib/source/test/lux/math/number/complex.lux
index 70706538d..e73c363ba 100644
--- a/stdlib/source/test/lux/math/number/complex.lux
+++ b/stdlib/source/test/lux/math/number/complex.lux
@@ -28,7 +28,7 @@
(def: dimension
(Random Frac)
(do {! random.monad}
- [factor (|> random.nat (\ ! map (|>> (n.% 1000) (n.max 1))))
+ [factor (|> random.nat (\ ! each (|>> (n.% 1000) (n.max 1))))
measure (|> random.safe_frac (random.only (f.> +0.0)))]
(in (f.* (|> factor .int int.frac)
measure))))
@@ -42,7 +42,7 @@
(def: angle
(Random /.Complex)
- (\ random.monad map
+ (\ random.monad each
(|>> (revised@ #/.real (f.% +1.0))
(revised@ #/.imaginary (f.% +1.0)))
..random))
@@ -260,11 +260,11 @@
Test
(do {! random.monad}
[sample ..random
- degree (|> random.nat (\ ! map (|>> (n.max 1) (n.% 5))))]
+ degree (|> random.nat (\ ! each (|>> (n.max 1) (n.% 5))))]
(_.cover [/.roots]
(|> sample
(/.roots degree)
- (list\map (/.pow' (|> degree .int int.frac)))
+ (list\each (/.pow' (|> degree .int int.frac)))
(list.every? (/.approximately? ..margin_of_error sample))))))
(def: .public test
diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux
index 91f44f41b..7b11df2cb 100644
--- a/stdlib/source/test/lux/math/number/frac.lux
+++ b/stdlib/source/test/lux/math/number/frac.lux
@@ -26,7 +26,7 @@
(def: random
(Random Frac)
- (\ random.monad map (|>> (i.% +1,000,000) i.frac) random.int))
+ (\ random.monad each (|>> (i.% +1,000,000) i.frac) random.int))
(def: constant
Test
@@ -52,7 +52,7 @@
Test
(do {! random.monad}
[sample ..random
- shift (\ ! map /.abs ..random)]
+ shift (\ ! each /.abs ..random)]
($_ _.and
(_.cover [/.negative?]
(bit\= (/.negative? sample)
@@ -77,15 +77,15 @@
Test
($_ _.and
(do {! random.monad}
- [expected (\ ! map (n.% 1,000,000) random.nat)]
+ [expected (\ ! each (n.% 1,000,000) random.nat)]
(_.cover [/.nat]
(|> expected n.frac /.nat (n.= expected))))
(do {! random.monad}
- [expected (\ ! map (i.% +1,000,000) random.int)]
+ [expected (\ ! each (i.% +1,000,000) random.int)]
(_.cover [/.int]
(|> expected i.frac /.int (i.= expected))))
(do {! random.monad}
- [expected (\ ! map (|>> (i64.left_shifted 52) .rev)
+ [expected (\ ! each (|>> (i64.left_shifted 52) .rev)
random.nat)]
(_.cover [/.rev]
(|> expected r.frac /.rev (r.= expected))))
@@ -100,8 +100,8 @@
($hash.spec /.hash random.frac))
(_.for [/.order /.<]
($order.spec /.order random.safe_frac))
- (~~ (template [<compose> <monoid>]
- [(_.for [<monoid> <compose>]
+ (~~ (template [<composite> <monoid>]
+ [(_.for [<monoid> <composite>]
($monoid.spec /.equivalence <monoid> ..random))]
[/.+ /.addition]
diff --git a/stdlib/source/test/lux/math/number/i16.lux b/stdlib/source/test/lux/math/number/i16.lux
index 807a58886..fbb0b62b7 100644
--- a/stdlib/source/test/lux/math/number/i16.lux
+++ b/stdlib/source/test/lux/math/number/i16.lux
@@ -16,7 +16,7 @@
(def: .public random
(Random /.I16)
- (\ random.functor map /.i16 random.i64))
+ (\ random.functor each /.i16 random.i64))
(def: .public test
Test
@@ -27,7 +27,7 @@
//i64.mask
.int
++)]
- expected (\ ! map (i.% limit) random.int)]
+ expected (\ ! each (i.% limit) random.int)]
($_ _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence ..random))
diff --git a/stdlib/source/test/lux/math/number/i32.lux b/stdlib/source/test/lux/math/number/i32.lux
index 06b2458e9..00a5daee6 100644
--- a/stdlib/source/test/lux/math/number/i32.lux
+++ b/stdlib/source/test/lux/math/number/i32.lux
@@ -16,7 +16,7 @@
(def: .public random
(Random /.I32)
- (\ random.functor map /.i32 random.i64))
+ (\ random.functor each /.i32 random.i64))
(def: .public test
Test
@@ -27,7 +27,7 @@
//i64.mask
.int
++)]
- expected (\ ! map (i.% limit) random.int)]
+ expected (\ ! each (i.% limit) random.int)]
($_ _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence ..random))
diff --git a/stdlib/source/test/lux/math/number/i64.lux b/stdlib/source/test/lux/math/number/i64.lux
index 4692a646c..851da2db3 100644
--- a/stdlib/source/test/lux/math/number/i64.lux
+++ b/stdlib/source/test/lux/math/number/i64.lux
@@ -22,7 +22,7 @@
Test
(do {! random.monad}
[pattern random.nat
- idx (\ ! map (n.% /.width) random.nat)]
+ idx (\ ! each (n.% /.width) random.nat)]
($_ _.and
(_.cover [/.one? /.one]
(if (/.one? idx pattern)
@@ -48,7 +48,7 @@
[pattern random.nat]
($_ _.and
(do !
- [idx (\ ! map (|>> (n.% (-- /.width)) ++) random.nat)]
+ [idx (\ ! each (|>> (n.% (-- /.width)) ++) random.nat)]
(_.cover [/.left_shifted /.right_shifted]
(let [nullity!
(and (\= pattern (/.left_shifted 0 pattern))
@@ -74,7 +74,7 @@
(<| (_.for [/.Mask])
(do {! random.monad}
[pattern random.nat
- idx (\ ! map (n.% /.width) random.nat)
+ idx (\ ! each (n.% /.width) random.nat)
signed random.int]
($_ _.and
(_.cover [/.sign]
@@ -98,9 +98,9 @@
empty!
full!)))
(do !
- [size (\ ! map (n.% /.width) random.nat)
+ [size (\ ! each (n.% /.width) random.nat)
.let [spare (n.- size /.width)]
- offset (\ ! map (n.% spare) random.nat)]
+ offset (\ ! each (n.% spare) random.nat)]
(_.cover [/.region]
(case size
0 (\= /.false (/.region offset size))
@@ -122,7 +122,7 @@
Test
(_.for [/.Sub]
(do {! random.monad}
- [size (\ ! map (n.% /.width) random.nat)]
+ [size (\ ! each (n.% /.width) random.nat)]
(case (/.sub size)
#.None
(_.cover [/.sub]
@@ -134,11 +134,11 @@
/.mask
.int
++)]
- expected (\ ! map (i.% limit) random.int)
+ expected (\ ! each (i.% limit) random.int)
.let [random (: (All [size]
(-> (-> I64 (I64 size)) (Random (I64 size))))
(function (_ narrow)
- (\ random.functor map narrow random.i64)))]]
+ (\ random.functor each narrow random.i64)))]]
($_ _.and
($equivalence.spec (\ sub &equivalence) (random (\ sub narrow)))
(_.cover [/.sub]
@@ -165,7 +165,7 @@
(_.for [.I64])
(do {! random.monad}
[pattern random.nat
- idx (\ ! map (n.% /.width) random.nat)]
+ idx (\ ! each (n.% /.width) random.nat)]
($_ _.and
(_.cover [/.width /.bits_per_byte /.bytes_per_i64]
(and (n.= /.bytes_per_i64
diff --git a/stdlib/source/test/lux/math/number/i8.lux b/stdlib/source/test/lux/math/number/i8.lux
index 7d753733d..8a8e7f0f6 100644
--- a/stdlib/source/test/lux/math/number/i8.lux
+++ b/stdlib/source/test/lux/math/number/i8.lux
@@ -16,7 +16,7 @@
(def: .public random
(Random /.I8)
- (\ random.functor map /.i8 random.i64))
+ (\ random.functor each /.i8 random.i64))
(def: .public test
Test
@@ -27,7 +27,7 @@
//i64.mask
.int
++)]
- expected (\ ! map (i.% limit) random.int)]
+ expected (\ ! each (i.% limit) random.int)]
($_ _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence ..random))
diff --git a/stdlib/source/test/lux/math/number/int.lux b/stdlib/source/test/lux/math/number/int.lux
index 3c7cb47be..be091eb18 100644
--- a/stdlib/source/test/lux/math/number/int.lux
+++ b/stdlib/source/test/lux/math/number/int.lux
@@ -36,8 +36,8 @@
($enum.spec /.enum random.int))
(_.for [/.interval]
($interval.spec /.interval random.int))
- (~~ (template [<compose> <monoid>]
- [(_.for [<monoid> <compose>]
+ (~~ (template [<composite> <monoid>]
+ [(_.for [<monoid> <composite>]
($monoid.spec /.equivalence <monoid> random.int))]
[/.+ /.addition]
@@ -136,7 +136,7 @@
))
(do {! random.monad}
[.let [random (|> random.int
- (\ ! map (/.% +1,000))
+ (\ ! each (/.% +1,000))
(random.only (|>> (/.= +0) not)))]
left random
right random]
@@ -177,14 +177,14 @@
(and subtraction!
inverse!))))
(do {! random.monad}
- [expected (\ ! map (/.% +1,000,000) random.int)
+ [expected (\ ! each (/.% +1,000,000) random.int)
sample random.int]
(_.cover [/.frac]
(and (|> expected /.frac f.int (/.= expected))
(f.number? (/.frac sample)))))
(do {! random.monad}
[pattern random.int
- idx (\ ! map (n.% i64.width) random.nat)]
+ idx (\ ! each (n.% i64.width) random.nat)]
(_.cover [/.right_shifted]
(let [nullity!
(/.= pattern (/.right_shifted 0 pattern))
diff --git a/stdlib/source/test/lux/math/number/nat.lux b/stdlib/source/test/lux/math/number/nat.lux
index bf4a7eb40..d01260c09 100644
--- a/stdlib/source/test/lux/math/number/nat.lux
+++ b/stdlib/source/test/lux/math/number/nat.lux
@@ -34,8 +34,8 @@
($enum.spec /.enum random.nat))
(_.for [/.interval]
($interval.spec /.interval random.nat))
- (~~ (template [<compose> <monoid>]
- [(_.for [<monoid> <compose>]
+ (~~ (template [<composite> <monoid>]
+ [(_.for [<monoid> <composite>]
($monoid.spec /.equivalence <monoid> random.nat))]
[/.+ /.addition]
@@ -104,7 +104,7 @@
(/.= rem (/.% left right)))))
))
(do {! random.monad}
- [.let [random (\ ! map (|>> (/.% 1,000) ++) random.nat)]
+ [.let [random (\ ! each (|>> (/.% 1,000) ++) random.nat)]
left random
right random]
($_ _.and
@@ -121,7 +121,7 @@
(/.= 0 (/.% right lcm)))))
))
(do {! random.monad}
- [expected (\ ! map (/.% 1,000,000) random.nat)
+ [expected (\ ! each (/.% 1,000,000) random.nat)
sample random.nat]
(_.cover [/.frac]
(and (|> expected /.frac f.nat (/.= expected))
diff --git a/stdlib/source/test/lux/math/number/ratio.lux b/stdlib/source/test/lux/math/number/ratio.lux
index 27da768f8..916cb5197 100644
--- a/stdlib/source/test/lux/math/number/ratio.lux
+++ b/stdlib/source/test/lux/math/number/ratio.lux
@@ -22,7 +22,7 @@
(def: part
(Random Nat)
- (\ random.monad map
+ (\ random.monad each
(|>> (n.% 1,000,000) (n.max 1))
random.nat))
@@ -43,8 +43,8 @@
($equivalence.spec /.equivalence ..random))
(_.for [/.order /.<]
($order.spec /.order ..random))
- (~~ (template [<compose> <monoid>]
- [(_.for [<monoid> <compose>]
+ (~~ (template [<composite> <monoid>]
+ [(_.for [<monoid> <composite>]
($monoid.spec /.equivalence <monoid> ..random))]
[/.+ /.addition]
@@ -68,13 +68,13 @@
(let [only_numerator!
(|> (/.ratio numerator)
/.nat
- (maybe\map (n\= numerator))
+ (maybe\each (n\= numerator))
(maybe.else false))
denominator_1!
(|> (/.ratio numerator 1)
/.nat
- (maybe\map (n\= numerator))
+ (maybe\each (n\= numerator))
(maybe.else false))
with_denominator!
diff --git a/stdlib/source/test/lux/math/number/rev.lux b/stdlib/source/test/lux/math/number/rev.lux
index fdb68b72c..cde50ec02 100644
--- a/stdlib/source/test/lux/math/number/rev.lux
+++ b/stdlib/source/test/lux/math/number/rev.lux
@@ -36,8 +36,8 @@
($enum.spec /.enum random.rev))
(_.for [/.interval]
($interval.spec /.interval random.rev))
- (~~ (template [<compose> <monoid>]
- [(_.for [<monoid> <compose>]
+ (~~ (template [<composite> <monoid>]
+ [(_.for [<monoid> <composite>]
($monoid.spec /.equivalence <monoid> random.rev))]
[/.+ /.addition]
@@ -88,18 +88,18 @@
(and (/.< left (/.* left right))
(/.< right (/.* left right)))))
(do {! random.monad}
- [.let [dividend (\ ! map (i64.and (hex "FFFF"))
+ [.let [dividend (\ ! each (i64.and (hex "FFFF"))
random.rev)
- divisor (\ ! map (|>> (i64.and (hex "F"))
- (i64.or (hex "1"))
- (i64.right_rotated 8)
- .rev)
+ divisor (\ ! each (|>> (i64.and (hex "F"))
+ (i64.or (hex "1"))
+ (i64.right_rotated 8)
+ .rev)
random.nat)]
dividend (random.only (/.> .0) dividend)
divisor/0 divisor
divisor/1 (random.only (|>> (/.= divisor/0) not)
divisor)
- scale (\ ! map (|>> (n.% 10) ++)
+ scale (\ ! each (|>> (n.% 10) ++)
random.nat)]
($_ _.and
(_.cover [/./]
@@ -155,7 +155,7 @@
(/.= (/.reciprocal sample)
(|> sample /.reciprocal .nat /.reciprocal .nat /.reciprocal))))
(do {! random.monad}
- [expected (\ ! map (|>> f.abs (f.% +1.0))
+ [expected (\ ! each (|>> f.abs (f.% +1.0))
random.safe_frac)
sample random.rev]
(_.cover [/.frac]
diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux
index 742523a67..7d397e5d5 100644
--- a/stdlib/source/test/lux/meta.lux
+++ b/stdlib/source/test/lux/meta.lux
@@ -248,13 +248,13 @@
(_.cover [/.imported_modules]
(and (|> (/.imported_modules expected_current_module)
(/.result expected_lux)
- (try\map (\ (list.equivalence text.equivalence) =
- (list imported_module_name)))
+ (try\each (\ (list.equivalence text.equivalence) =
+ (list imported_module_name)))
(try.else false))
(|> (/.imported_modules imported_module_name)
(/.result expected_lux)
- (try\map (\ (list.equivalence text.equivalence) =
- (list)))
+ (try\each (\ (list.equivalence text.equivalence) =
+ (list)))
(try.else false))))
(_.cover [/.imported_by?]
(|> (/.imported_by? imported_module_name expected_current_module)
@@ -290,8 +290,8 @@
version (random.ascii/upper 1)
source_code (random.ascii/upper 1)
expected_current_module (random.ascii/upper 1)
- expected_type (\ ! map (function (_ name)
- (#.Primitive name (list)))
+ expected_type (\ ! each (function (_ name)
+ (#.Primitive name (list)))
(random.ascii/upper 1))
expected_seed random.nat
expected random.nat
@@ -338,7 +338,7 @@
(_.cover [.Type_Context /.type_context]
(|> /.type_context
(/.result expected_lux)
- (try\map (same? type_context))
+ (try\each (same? type_context))
(try.else false)))
)))
@@ -349,8 +349,8 @@
expected_macro_module (random.only (|>> (text\= expected_current_module) not)
(random.ascii/upper 1))
expected_short (random.ascii/upper 1)
- expected_type (\ ! map (function (_ name)
- (#.Primitive name (list)))
+ expected_type (\ ! each (function (_ name)
+ (#.Primitive name (list)))
(random.ascii/upper 1))
expected_value (random.either (in .def:)
(in .macro:))
@@ -470,8 +470,8 @@
expected_macro_module (random.only (|>> (text\= expected_current_module) not)
(random.ascii/upper 1))
expected_short (random.ascii/upper 1)
- expected_type (\ ! map (function (_ name)
- (#.Primitive name (list)))
+ expected_type (\ ! each (function (_ name)
+ (#.Primitive name (list)))
(random.ascii/upper 1))
.let [expected_annotations (' [])]
expected_value (random.either (in .def:)
@@ -580,11 +580,11 @@
(expected_lux true (#.Some .Macro))]
(and (|> (/.de_aliased [expected_macro_module expected_short])
(/.result expected_lux)
- (try\map (name\= [expected_macro_module expected_short]))
+ (try\each (name\= [expected_macro_module expected_short]))
(try.else false))
(|> (/.de_aliased [expected_current_module expected_short])
(/.result expected_lux)
- (try\map (name\= [expected_macro_module expected_short]))
+ (try\each (name\= [expected_macro_module expected_short]))
(try.else false)))))
(_.cover [/.definition]
(let [[current_globals macro_globals expected_lux]
@@ -654,11 +654,11 @@
name_1 (random.only (|>> (text\= name_0) not)
(random.ascii/upper 1))
- .let [random_tag (\ ! map (|>> [tag_module])
+ .let [random_tag (\ ! each (|>> [tag_module])
(random.ascii/upper 1))]
all_tags (|> random_tag
(random.set name.hash 10)
- (\ ! map set.list))
+ (\ ! each set.list))
.let [tags_0 (list.first 5 all_tags)
tags_1 (list.after 5 all_tags)
@@ -690,14 +690,14 @@
#.module_aliases (list)
#.definitions (list)
#.imports (list)
- #.tags (list\compose (|> tags_0
- list.enumeration
- (list\map (function (_ [index [_ short]])
- [short [index tags_0 false type_0]])))
- (|> tags_1
- list.enumeration
- (list\map (function (_ [index [_ short]])
- [short [index tags_1 true type_1]]))))
+ #.tags (list\composite (|> tags_0
+ list.enumeration
+ (list\each (function (_ [index [_ short]])
+ [short [index tags_0 false type_0]])))
+ (|> tags_1
+ list.enumeration
+ (list\each (function (_ [index [_ short]])
+ [short [index tags_1 true type_1]]))))
#.types (list entry_0 entry_1)
#.module_annotations #.None
#.module_state #.Active}])
@@ -719,12 +719,12 @@
type.equivalence))]
(|> (/.tag_lists tag_module)
(/.result expected_lux)
- (try\map (\ equivalence = (list [tags_1 type_1])))
+ (try\each (\ equivalence = (list [tags_1 type_1])))
(try.else false))))
(_.cover [/.tags_of]
(|> (/.tags_of [tag_module name_1])
(/.result expected_lux)
- (try\map (\ (maybe.equivalence (list.equivalence name.equivalence)) = (#.Some tags_1)))
+ (try\each (\ (maybe.equivalence (list.equivalence name.equivalence)) = (#.Some tags_1)))
(try.else false)))
(_.cover [/.tag]
(|> tags_1
@@ -757,7 +757,7 @@
[current_module (random.ascii/upper 1)
[name_0 name_1 name_2 name_3 name_4] (|> (random.ascii/upper 1)
(random.set text.hash 5)
- (\ ! map set.list)
+ (\ ! each set.list)
(random.one (function (_ values)
(case values
(^ (list name_0 name_1 name_2 name_3 name_4))
@@ -831,51 +831,51 @@
type.equivalence))))]
(|> /.locals
(/.result expected_lux)
- (try\map (\ equivalence = (list (list [name_3 type_3])
- (list [name_1 type_1]
- [name_2 type_2]))))
+ (try\each (\ equivalence = (list (list [name_3 type_3])
+ (list [name_1 type_1]
+ [name_2 type_2]))))
(try.else false))))
(_.cover [/.var_type]
(and (|> (/.var_type name_0)
(/.result expected_lux)
- (try\map (\ type.equivalence = type_0))
+ (try\each (\ type.equivalence = type_0))
(try.else false))
(|> (/.var_type name_1)
(/.result expected_lux)
- (try\map (\ type.equivalence = type_1))
+ (try\each (\ type.equivalence = type_1))
(try.else false))
(|> (/.var_type name_2)
(/.result expected_lux)
- (try\map (\ type.equivalence = type_2))
+ (try\each (\ type.equivalence = type_2))
(try.else false))
(|> (/.var_type name_3)
(/.result expected_lux)
- (try\map (\ type.equivalence = type_3))
+ (try\each (\ type.equivalence = type_3))
(try.else false))))
(_.cover [/.type]
(and (|> (/.type ["" name_0])
(/.result expected_lux)
- (try\map (\ type.equivalence = type_0))
+ (try\each (\ type.equivalence = type_0))
(try.else false))
(|> (/.type ["" name_1])
(/.result expected_lux)
- (try\map (\ type.equivalence = type_1))
+ (try\each (\ type.equivalence = type_1))
(try.else false))
(|> (/.type ["" name_2])
(/.result expected_lux)
- (try\map (\ type.equivalence = type_2))
+ (try\each (\ type.equivalence = type_2))
(try.else false))
(|> (/.type ["" name_3])
(/.result expected_lux)
- (try\map (\ type.equivalence = type_3))
+ (try\each (\ type.equivalence = type_3))
(try.else false))
(|> (/.type [current_module name_4])
(/.result expected_lux)
- (try\map (\ type.equivalence = type_4))
+ (try\each (\ type.equivalence = type_4))
(try.else false))
(|> (/.type ["" name_4])
(/.result expected_lux)
- (try\map (\ type.equivalence = type_4))
+ (try\each (\ type.equivalence = type_4))
(try.else false))))
)))
@@ -904,8 +904,8 @@
version (random.ascii/upper 1)
source_code (random.ascii/upper 1)
expected_current_module (random.ascii/upper 1)
- expected_type (\ ! map (function (_ name)
- (#.Primitive name (list)))
+ expected_type (\ ! each (function (_ name)
+ (#.Primitive name (list)))
(random.ascii/upper 1))
expected_seed random.nat
expected random.nat
diff --git a/stdlib/source/test/lux/meta/annotation.lux b/stdlib/source/test/lux/meta/annotation.lux
index e0fa2d3e5..f80ffeb29 100644
--- a/stdlib/source/test/lux/meta/annotation.lux
+++ b/stdlib/source/test/lux/meta/annotation.lux
@@ -36,13 +36,13 @@
(def: (random_sequence random)
(All [a] (-> (Random a) (Random (List a))))
(do {! random.monad}
- [size (|> random.nat (\ ! map (nat.% 3)))]
+ [size (|> random.nat (\ ! each (nat.% 3)))]
(random.list size random)))
(def: (random_record random)
(All [a] (-> (Random a) (Random (List [a a]))))
(do {! random.monad}
- [size (|> random.nat (\ ! map (nat.% 3)))]
+ [size (|> random.nat (\ ! each (nat.% 3)))]
(random.list size (random.and random random))))
(template: (!expect <pattern> <value>)
@@ -115,7 +115,6 @@
[/.implementation? #.implementation?]
[/.recursive_type? #.type_rec?]
- [/.interface? #.interface?]
))
))))
@@ -128,11 +127,11 @@
[(do !
[expected (random.list 5 (random.ascii/alpha 1))]
(_.cover [<definition>]
- (and (|> expected (list\map code.text) code.tuple
+ (and (|> expected (list\each code.text) code.tuple
(..annotation (name_of <tag>))
<definition>
(\ (list.equivalence text.equivalence) = expected))
- (|> expected (list\map code.text) code.tuple
+ (|> expected (list\each code.text) code.tuple
(..annotation key)
<definition>
(\ (list.equivalence text.equivalence) = (list))))))]
diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux
index 2a21207d4..541e7c763 100644
--- a/stdlib/source/test/lux/target/jvm.lux
+++ b/stdlib/source/test/lux/target/jvm.lux
@@ -55,7 +55,7 @@
["." category (#+ Value Object Class)]]]])
(def: method_modifier
- ($_ /modifier\compose
+ ($_ /modifier\composite
/method.public
/method.static))
@@ -134,11 +134,12 @@
false))))
(type: (Primitive a)
- {#unboxed (Type category.Return)
- #boxed (Type category.Class)
- #wrap (Bytecode Any)
- #random (Random a)
- #literal (-> a (Bytecode Any))})
+ (Record
+ {#unboxed (Type category.Return)
+ #boxed (Type category.Class)
+ #wrap (Bytecode Any)
+ #random (Random a)
+ #literal (-> a (Bytecode Any))}))
(def: $Boolean
(/type.class "java.lang.Boolean" (list)))
@@ -166,7 +167,7 @@
(/.invokestatic ..$Byte "valueOf" (/type.method [(list) (list /type.byte) ..$Byte (list)])))
(def: $Byte::random
(Random java/lang/Byte)
- (\ random.monad map (|>> (:as java/lang/Long) ffi.long_to_byte) random.int))
+ (\ random.monad each (|>> (:as java/lang/Long) ffi.long_to_byte) random.int))
(def: $Byte::literal
(-> java/lang/Byte (Bytecode Any))
(|>> ffi.byte_to_long (:as I64) i32.i32 /.int))
@@ -184,7 +185,7 @@
(/.invokestatic ..$Short "valueOf" (/type.method [(list) (list /type.short) ..$Short (list)])))
(def: $Short::random
(Random java/lang/Short)
- (\ random.monad map (|>> (:as java/lang/Long) ffi.long_to_short) random.int))
+ (\ random.monad each (|>> (:as java/lang/Long) ffi.long_to_short) random.int))
(def: $Short::literal
(-> java/lang/Short (Bytecode Any))
(|>> ffi.short_to_long (:as I64) i32.i32 /.int))
@@ -202,7 +203,7 @@
(/.invokestatic ..$Integer "valueOf" (/type.method [(list) (list /type.int) ..$Integer (list)])))
(def: $Integer::random
(Random java/lang/Integer)
- (\ random.monad map (|>> (:as java/lang/Long) ffi.long_to_int) random.int))
+ (\ random.monad each (|>> (:as java/lang/Long) ffi.long_to_int) random.int))
(def: $Integer::literal
(-> java/lang/Integer (Bytecode Any))
(|>> ffi.int_to_long (:as I64) i32.i32 /.int))
@@ -230,7 +231,7 @@
(def: $Float::wrap (/.invokestatic ..$Float "valueOf" (/type.method [(list) (list /type.float) ..$Float (list)])))
(def: $Float::random
(Random java/lang/Float)
- (\ random.monad map
+ (\ random.monad each
(|>> (:as java/lang/Double) ffi.double_to_float)
random.frac))
(def: $Float::literal /.float)
@@ -270,7 +271,7 @@
(/.invokestatic ..$Character "valueOf" (/type.method [(list) (list /type.char) ..$Character (list)])))
(def: $Character::random
(Random java/lang/Character)
- (\ random.monad map (|>> (:as java/lang/Long) ffi.long_to_int ffi.int_to_char) random.int))
+ (\ random.monad each (|>> (:as java/lang/Long) ffi.long_to_int ffi.int_to_char) random.int))
(def: $Character::literal
(-> java/lang/Character (Bytecode Any))
(|>> ffi.char_to_long (:as I64) i32.i32 /.int))
@@ -305,7 +306,7 @@
[(def: <name>
Test
(do {! random.monad}
- [expected (\ ! map (i64.and (i64.mask <bits>)) random.nat)]
+ [expected (\ ! each (i64.and (i64.mask <bits>)) random.nat)]
(<| (_.lifted <message>)
(..bytecode (for {@.old
(|>> (:as <type>) <to_long> ("jvm leq" expected))
@@ -383,7 +384,7 @@
shift (: (-> (-> java/lang/Integer java/lang/Integer java/lang/Integer) (Bytecode Any) (Random Bit))
(function (_ reference instruction)
(do {! random.monad}
- [parameter (\ ! map (|>> (n.% 32) .int (:as java/lang/Long) ffi.long_to_int) random.nat)
+ [parameter (\ ! each (|>> (n.% 32) .int (:as java/lang/Long) ffi.long_to_int) random.nat)
subject ..$Integer::random]
(int (reference parameter subject)
(do /.monad
@@ -462,7 +463,7 @@
shift (: (-> (-> java/lang/Integer java/lang/Long java/lang/Long) (Bytecode Any) (Random Bit))
(function (_ reference instruction)
(do {! random.monad}
- [parameter (\ ! map (|>> (n.% 64) (:as java/lang/Long)) random.nat)
+ [parameter (\ ! each (|>> (n.% 64) (:as java/lang/Long)) random.nat)
subject ..$Long::random]
(long (reference (ffi.long_to_int parameter) subject)
(do /.monad
@@ -869,7 +870,7 @@
_ /.lload_1
_ (/.putfield $Self object_field /type.long)]
/.return)))
- (/method.method ($_ /modifier\compose
+ (/method.method ($_ /modifier\composite
/method.public
/method.static)
static_method
@@ -943,7 +944,7 @@
Test))
(function (_ constructor random literal [*store *load *wrap] test)
(do {! random.monad}
- [size (\ ! map (|>> (n.% 1024) (n.max 1)) random.nat)
+ [size (\ ! each (|>> (n.% 1024) (n.max 1)) random.nat)
value random]
($_ _.and
(<| (_.lifted "length")
@@ -1015,7 +1016,7 @@
(function (_ expected) (|>> (:as Text) (text\= (:as Text expected))))))
(<| (_.context "multi")
(do {! random.monad}
- [.let [size (\ ! map (|>> (n.% 5) (n.+ 1))
+ [.let [size (\ ! each (|>> (n.% 5) (n.+ 1))
random.nat)]
dimensions size
sizesH size
@@ -1029,8 +1030,8 @@
(<| (_.lifted "MULTIANEWARRAY")
(..bytecode (|>> (:as Nat) (n.= sizesH)))
(do {! /.monad}
- [_ (monad.map ! (|>> (:as java/lang/Long) ffi.long_to_int ..$Integer::literal)
- (#.Item sizesH sizesT))
+ [_ (monad.each ! (|>> (:as java/lang/Long) ffi.long_to_int ..$Integer::literal)
+ (#.Item sizesH sizesT))
_ (/.multianewarray type (|> dimensions /unsigned.u1 try.trusted))
_ ?length]
$Long::wrap))))
@@ -1128,7 +1129,7 @@
(function (_ random_value literal *wrap [store load] test)
(do {! random.monad}
[expected random_value
- register (\ ! map (n.% 128) random.nat)]
+ register (\ ! each (n.% 128) random.nat)]
(<| (..bytecode (test expected))
(do /.monad
[_ (literal expected)
@@ -1152,7 +1153,7 @@
(_.lifted "IINC"
(do {! random.monad}
[base ..$Byte::random
- increment (\ ! map (|>> (n.% 100) /unsigned.u1 try.trusted)
+ increment (\ ! each (|>> (n.% 100) /unsigned.u1 try.trusted)
random.nat)
.let [expected (: java/lang/Long
(for {@.old
@@ -1476,9 +1477,9 @@
(do {! random.monad}
[expected ..$Long::random
dummy ..$Long::random
- minimum (\ ! map (|>> (n.% 100) .int /signed.s4 try.trusted)
+ minimum (\ ! each (|>> (n.% 100) .int /signed.s4 try.trusted)
random.nat)
- afterwards (\ ! map (n.% 10) random.nat)])
+ afterwards (\ ! each (n.% 10) random.nat)])
(..bytecode ((!::= java/lang/Long "jvm leq" "jvm long =") expected))
(do /.monad
[@right /.new_label
@@ -1495,13 +1496,13 @@
..$Long::wrap))
(<| (_.lifted "LOOKUPSWITCH")
(do {! random.monad}
- [options (\ ! map (|>> (n.% 10) (n.+ 1))
+ [options (\ ! each (|>> (n.% 10) (n.+ 1))
random.nat)
- choice (\ ! map (n.% options) random.nat)
+ choice (\ ! each (n.% options) random.nat)
options (|> random.int
- (\ ! map (|>> (:as java/lang/Long) ffi.long_to_int ffi.int_to_long (:as Int)))
+ (\ ! each (|>> (:as java/lang/Long) ffi.long_to_int ffi.int_to_long (:as Int)))
(random.set i.hash options)
- (\ ! map set.list))
+ (\ ! each set.list))
.let [choice (maybe.trusted (list.item choice options))]
expected ..$Long::random
dummy ..$Long::random])
@@ -1511,10 +1512,10 @@
@wrong /.new_label
@return /.new_label
_ (..$Integer::literal (ffi.long_to_int (:as java/lang/Long choice)))
- _ (/.lookupswitch @wrong (list\map (function (_ option)
- [(|> option /signed.s4 try.trusted)
- (if (i.= choice option) @right @wrong)])
- options))
+ _ (/.lookupswitch @wrong (list\each (function (_ option)
+ [(|> option /signed.s4 try.trusted)
+ (if (i.= choice option) @right @wrong)])
+ options))
_ (/.set_label @wrong)
_ (..$Long::literal dummy)
_ (/.goto @return)
@@ -1626,17 +1627,17 @@
[_ (..$Long::literal value)]
/.lreturn)))))
- interface_bytecode (|> (/class.class /version.v6_0 ($_ /modifier\compose /class.public /class.abstract /class.interface)
+ interface_bytecode (|> (/class.class /version.v6_0 ($_ /modifier\composite /class.public /class.abstract /class.interface)
(/name.internal interface_class)
(/name.internal "java.lang.Object")
(list)
(list)
- (list (/method.method ($_ /modifier\compose /method.public /method.abstract)
+ (list (/method.method ($_ /modifier\composite /method.public /method.abstract)
interface_method method::type (list) #.None))
(row.row))
try.trusted
(format.result /class.writer))
- abstract_bytecode (|> (/class.class /version.v6_0 ($_ /modifier\compose /class.public /class.abstract)
+ abstract_bytecode (|> (/class.class /version.v6_0 ($_ /modifier\composite /class.public /class.abstract)
(/name.internal abstract_class)
(/name.internal "java.lang.Object")
(list)
@@ -1651,7 +1652,7 @@
/.return)))
(method inherited_method part0)
(method overriden_method fake_part2)
- (/method.method ($_ /modifier\compose /method.public /method.abstract)
+ (/method.method ($_ /modifier\composite /method.public /method.abstract)
abstract_method method::type (list) #.None))
(row.row))
try.trusted
@@ -1678,7 +1679,7 @@
(method overriden_method part2)
(method abstract_method part3)
(method interface_method part4)
- (/method.method ($_ /modifier\compose
+ (/method.method ($_ /modifier\composite
/method.public
/method.static)
static_method
diff --git a/stdlib/source/test/lux/test.lux b/stdlib/source/test/lux/test.lux
index e51623e28..516f1eb51 100644
--- a/stdlib/source/test/lux/test.lux
+++ b/stdlib/source/test/lux/test.lux
@@ -99,7 +99,7 @@
(n.= 0 (value@ #/.successes tally))
(n.= 1 (value@ #/.failures tally)))))))
(do {! random.monad}
- [expected (\ ! map (|>> (n.% 10) ++) random.nat)
+ [expected (\ ! each (|>> (n.% 10) ++) random.nat)
.let [counter (: (Atom Nat)
(atom.atom 0))]
times_assertion (<| (/.times expected)
@@ -120,7 +120,7 @@
/.Test
($_ /.and
(do {! random.monad}
- [expected (\ ! map (|>> (n.% 10) ++) random.nat)
+ [expected (\ ! each (|>> (n.% 10) ++) random.nat)
.let [counter (: (Atom Nat)
(atom.atom 0))]
assertion (<| /.in_parallel
@@ -138,7 +138,7 @@
(n.= expected (value@ #/.successes tally))
(n.= 0 (value@ #/.failures tally)))))))
(do {! random.monad}
- [expected (\ ! map (|>> (n.% 10) ++) random.nat)
+ [expected (\ ! each (|>> (n.% 10) ++) random.nat)
.let [counter (: (Atom Nat)
(atom.atom 0))]
assertion (<| /.in_parallel
diff --git a/stdlib/source/test/lux/time.lux b/stdlib/source/test/lux/time.lux
index 81c56089d..c1f967528 100644
--- a/stdlib/source/test/lux/time.lux
+++ b/stdlib/source/test/lux/time.lux
@@ -53,16 +53,16 @@
(|> expected
/.clock
/.time
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false)))))
(def: for_ranges
Test
(do {! random.monad}
- [valid_hour (\ ! map (|>> (n.% /.hours) (n.max 10)) random.nat)
- valid_minute (\ ! map (|>> (n.% /.minutes) (n.max 10)) random.nat)
- valid_second (\ ! map (|>> (n.% /.seconds) (n.max 10)) random.nat)
- valid_milli_second (\ ! map (n.% /.milli_seconds) random.nat)
+ [valid_hour (\ ! each (|>> (n.% /.hours) (n.max 10)) random.nat)
+ valid_minute (\ ! each (|>> (n.% /.minutes) (n.max 10)) random.nat)
+ valid_second (\ ! each (|>> (n.% /.seconds) (n.max 10)) random.nat)
+ valid_milli_second (\ ! each (n.% /.milli_seconds) random.nat)
.let [invalid_hour (|> valid_hour (n.+ /.hours))
invalid_minute (|> valid_minute (n.+ /.minutes) (n.min 99))
@@ -114,7 +114,7 @@
[.let [day (.nat (duration.millis duration.day))]
expected random.time
- out_of_bounds (\ ! map (|>> /.millis (n.+ day))
+ out_of_bounds (\ ! each (|>> /.millis (n.+ day))
random.time)]
(`` ($_ _.and
..for_implementation
@@ -123,7 +123,7 @@
(|> expected
/.millis
/.of_millis
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false)))
(_.cover [/.time_exceeds_a_day]
(case (/.of_millis out_of_bounds)
@@ -140,7 +140,7 @@
(|> expected
(\ /.codec encoded)
(<text>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false)))
..for_ranges
(_.for [/.Clock]
diff --git a/stdlib/source/test/lux/time/date.lux b/stdlib/source/test/lux/time/date.lux
index 87e54e623..2492e1e31 100644
--- a/stdlib/source/test/lux/time/date.lux
+++ b/stdlib/source/test/lux/time/date.lux
@@ -45,7 +45,7 @@
(|> (/.date (/.year expected)
(/.month expected)
(/.day_of_month expected))
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false))))
(do random.monad
[expected random.date]
@@ -74,14 +74,14 @@
(_.cover [/.parser]
(|> (\ /.codec encoded expected)
(<text>.result /.parser)
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false))))
(do {! random.monad}
- [year (\ ! map (|>> (n.% 10,000) ++)
+ [year (\ ! each (|>> (n.% 10,000) ++)
random.nat)
- month (\ ! map (|>> (n.% 10) (n.+ 13))
+ month (\ ! each (|>> (n.% 10) (n.+ 13))
random.nat)
- day (\ ! map (|>> (n.% 10) (n.+ 10))
+ day (\ ! each (|>> (n.% 10) (n.+ 10))
random.nat)
.let [input (format (%.nat year)
"-" (%.nat month)
diff --git a/stdlib/source/test/lux/time/day.lux b/stdlib/source/test/lux/time/day.lux
index 462a96939..82a3f3df1 100644
--- a/stdlib/source/test/lux/time/day.lux
+++ b/stdlib/source/test/lux/time/day.lux
@@ -69,7 +69,7 @@
(|> expected
/.number
/.by_number
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false)))
(_.cover [/.invalid_day]
(case (/.by_number invalid)
diff --git a/stdlib/source/test/lux/time/duration.lux b/stdlib/source/test/lux/time/duration.lux
index f522dc613..5eb56c94b 100644
--- a/stdlib/source/test/lux/time/duration.lux
+++ b/stdlib/source/test/lux/time/duration.lux
@@ -67,10 +67,10 @@
[.let [(^open "\.") /.order
positive (|> random.duration
(random.only (|>> (\= /.empty) not))
- (\ ! map (function (_ duration)
- (if (/.positive? duration)
- duration
- (/.inverse duration)))))]
+ (\ ! each (function (_ duration)
+ (if (/.positive? duration)
+ duration
+ (/.inverse duration)))))]
sample positive
frame positive]
(`` ($_ _.and
diff --git a/stdlib/source/test/lux/time/month.lux b/stdlib/source/test/lux/time/month.lux
index 7f5487069..0874c2ec1 100644
--- a/stdlib/source/test/lux/time/month.lux
+++ b/stdlib/source/test/lux/time/month.lux
@@ -31,7 +31,7 @@
(Random /.Month)
(let [december (/.number #/.December)]
(|> random.nat
- (\ random.monad map (|>> (n.% december) ++))
+ (\ random.monad each (|>> (n.% december) ++))
(random.one (|>> /.by_number try.maybe)))))
(def: .public test
@@ -60,7 +60,7 @@
(|> expected
/.number
/.by_number
- (try\map (\ /.equivalence = expected))
+ (try\each (\ /.equivalence = expected))
(try.else false)))
(_.cover [/.invalid_month]
(case (/.by_number invalid)
@@ -79,13 +79,13 @@
(_.cover [/.days]
(let [expected (.nat (duration.ticks duration.day duration.normal_year))]
(|> /.year
- (list\map /.days)
+ (list\each /.days)
(list\mix n.+ 0)
(n.= expected))))
(_.cover [/.leap_year_days]
(let [expected (.nat (duration.ticks duration.day duration.leap_year))]
(|> /.year
- (list\map /.leap_year_days)
+ (list\each /.leap_year_days)
(list\mix n.+ 0)
(n.= expected))))
(do random.monad
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
index 92acc8672..43a7fd17a 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
@@ -45,7 +45,7 @@
#.End
(#.Item head+ #.End)
- (list\map (|>> list) head+)
+ (list\each (|>> list) head+)
(#.Item head+ tail++)
(do list.monad
@@ -84,33 +84,33 @@
[_ (#.Tuple members)]
(do {! r.monad}
- [member_wise_patterns (monad.map ! (exhaustive_branches allow_literals? variantTC) members)]
+ [member_wise_patterns (monad.each ! (exhaustive_branches allow_literals? variantTC) members)]
(in (|> member_wise_patterns
exhaustive_weaving
- (list\map code.tuple))))
+ (list\each code.tuple))))
(^ [_ (#.Record (list))])
(r\in (list (' {})))
[_ (#.Record kvs)]
(do {! r.monad}
- [.let [ks (list\map product.left kvs)
- vs (list\map product.right kvs)]
- member_wise_patterns (monad.map ! (exhaustive_branches allow_literals? variantTC) vs)]
+ [.let [ks (list\each product.left kvs)
+ vs (list\each product.right kvs)]
+ member_wise_patterns (monad.each ! (exhaustive_branches allow_literals? variantTC) vs)]
(in (|> member_wise_patterns
exhaustive_weaving
- (list\map (|>> (list.zipped/2 ks) code.record)))))
+ (list\each (|>> (list.zipped/2 ks) code.record)))))
(^ [_ (#.Form (list [_ (#.Tag _)] _))])
(do {! r.monad}
- [bundles (monad.map !
- (function (_ [_tag _code])
- (do !
- [v_branches (exhaustive_branches allow_literals? variantTC _code)]
- (in (list\map (function (_ pattern) (` ((~ _tag) (~ pattern))))
- v_branches))))
- variantTC)]
- (in (list\join bundles)))
+ [bundles (monad.each !
+ (function (_ [_tag _code])
+ (do !
+ [v_branches (exhaustive_branches allow_literals? variantTC _code)]
+ (in (list\each (function (_ pattern) (` ((~ _tag) (~ pattern))))
+ v_branches))))
+ variantTC)]
+ (in (list\conjoint bundles)))
_
(r\in (list))
@@ -121,14 +121,14 @@
(r.rec
(function (_ input)
($_ r.either
- (r\map product.right _primitive.primitive)
+ (r\each product.right _primitive.primitive)
(do {! r.monad}
- [choice (|> r.nat (\ ! map (n.% (list.size variant_tags))))
+ [choice (|> r.nat (\ ! each (n.% (list.size variant_tags))))
.let [choiceT (maybe.trusted (list.item choice variant_tags))
choiceC (maybe.trusted (list.item choice primitivesC))]]
(in (` ((~ choiceT) (~ choiceC)))))
(do {! r.monad}
- [size (|> r.nat (\ ! map (n.% 3)))
+ [size (|> r.nat (\ ! each (n.% 3)))
elems (r.list size input)]
(in (code.tuple elems)))
(r\in (code.record (list.zipped/2 record_tags primitivesC)))
@@ -144,15 +144,15 @@
[module_name (r.unicode 5)
variant_name (r.unicode 5)
record_name (|> (r.unicode 5) (r.only (|>> (text\= variant_name) not)))
- size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2))))
- variant_tags (|> (r.set text.hash size (r.unicode 5)) (\ ! map set.list))
- record_tags (|> (r.set text.hash size (r.unicode 5)) (\ ! map set.list))
+ size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
+ variant_tags (|> (r.set text.hash size (r.unicode 5)) (\ ! each set.list))
+ record_tags (|> (r.set text.hash size (r.unicode 5)) (\ ! each set.list))
primitivesTC (r.list size _primitive.primitive)
- .let [primitivesT (list\map product.left primitivesTC)
- primitivesC (list\map product.right primitivesTC)
+ .let [primitivesT (list\each product.left primitivesTC)
+ primitivesC (list\each product.right primitivesTC)
code_tag (|>> [module_name] code.tag)
- variant_tags+ (list\map code_tag variant_tags)
- record_tags+ (list\map code_tag record_tags)
+ variant_tags+ (list\each code_tag variant_tags)
+ record_tags+ (list\each code_tag record_tags)
variantTC (list.zipped/2 variant_tags+ primitivesC)]
inputC (input variant_tags+ record_tags+ primitivesC)
[outputT outputC] (r.only (|>> product.left (same? Any) not)
@@ -170,8 +170,8 @@
(type.tuple primitivesT)))])
(//module.with_module 0 module_name)))]
exhaustive_patterns (exhaustive_branches true variantTC inputC)
- .let [exhaustive_branchesC (list\map (branch outputC)
- exhaustive_patterns)]]
+ .let [exhaustive_branchesC (list\each (branch outputC)
+ exhaustive_patterns)]]
($_ _.and
(_.test "Will reject empty pattern-matching (no branches)."
(|> (analyse_pm (list))
@@ -186,8 +186,8 @@
_structure.check_fails)))
(do !
[redundant_patterns (exhaustive_branches false variantTC inputC)
- redundancy_idx (|> r.nat (\ ! map (n.% (list.size redundant_patterns))))
- .let [redundant_branchesC (<| (list!map (branch outputC))
+ redundancy_idx (|> r.nat (\ ! each (n.% (list.size redundant_patterns))))
+ .let [redundant_branchesC (<| (list!each (branch outputC))
list.together
(list (list.first redundancy_idx redundant_patterns)
(list (maybe.trusted (list.item redundancy_idx redundant_patterns)))
@@ -198,7 +198,7 @@
(do !
[[heterogeneousT heterogeneousC] (r.only (|>> product.left (check.subsumes? outputT) not)
_primitive.primitive)
- heterogeneous_idx (|> r.nat (\ ! map (n.% (list.size exhaustive_patterns))))
+ heterogeneous_idx (|> r.nat (\ ! each (n.% (list.size exhaustive_patterns))))
.let [heterogeneous_branchesC (list.together (list (list.first heterogeneous_idx exhaustive_branchesC)
(list (let [[_pattern _body] (maybe.trusted (list.item heterogeneous_idx exhaustive_branchesC))]
[_pattern heterogeneousC]))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
index b0feacead..d87321459 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
@@ -81,12 +81,12 @@
(def: apply
(do {! r.monad}
- [full_args (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2))))
- partial_args (|> r.nat (\ ! map (n.% full_args)))
- var_idx (|> r.nat (\ ! map (|>> (n.% full_args) (n.max 1))))
+ [full_args (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
+ partial_args (|> r.nat (\ ! each (n.% full_args)))
+ var_idx (|> r.nat (\ ! each (|>> (n.% full_args) (n.max 1))))
inputsTC (r.list full_args _primitive.primitive)
- .let [inputsT (list\map product.left inputsTC)
- inputsC (list\map product.right inputsTC)]
+ .let [inputsT (list\each product.left inputsTC)
+ inputsC (list\each product.right inputsTC)]
[outputT outputC] _primitive.primitive
.let [funcT (type.function inputsT outputT)
partialT (type.function (list.after partial_args inputsT) outputT)
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux
index fcec6b95c..1016f975d 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux
@@ -54,7 +54,7 @@
(Random [Type Code])
(`` ($_ r.either
(~~ (template [<type> <code_wrapper> <value_gen>]
- [(r.and (r\in <type>) (r\map <code_wrapper> <value_gen>))]
+ [(r.and (r\in <type>) (r\each <code_wrapper> <value_gen>))]
[Any code.tuple (r.list 0 (r\in (' [])))]
[Bit code.bit r.bit]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
index ef7be9dcd..812e876bb 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
@@ -1,6 +1,7 @@
(.module:
[lux #*
- [abstract ["." monad (#+ do)]]
+ [abstract
+ ["." monad (#+ do)]]
[data
["." name ("#\." equivalence)]]
["r" math/random (#+ Random)]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
index 1b8939368..4802c0910 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
@@ -119,19 +119,19 @@
(def: sum
(do {! r.monad}
- [size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2))))
- choice (|> r.nat (\ ! map (n.% size)))
+ [size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
+ choice (|> r.nat (\ ! each (n.% size)))
primitives (r.list size _primitive.primitive)
- +choice (|> r.nat (\ ! map (n.% (++ size))))
+ +choice (|> r.nat (\ ! each (n.% (++ size))))
[_ +valueC] _primitive.primitive
- .let [variantT (type.variant (list\map product.left primitives))
+ .let [variantT (type.variant (list\each product.left primitives))
[valueT valueC] (maybe.trusted (list.item choice primitives))
+size (++ size)
+primitives (list.together (list (list.first choice primitives)
(list [(#.Parameter 1) +valueC])
(list.after choice primitives)))
[+valueT +valueC] (maybe.trusted (list.item +choice +primitives))
- +variantT (type.variant (list\map product.left +primitives))]]
+ +variantT (type.variant (list\each product.left +primitives))]]
(<| (_.context (%.name (name_of /.sum)))
($_ _.and
(_.test "Can analyse."
@@ -171,21 +171,21 @@
(def: product
(do {! r.monad}
- [size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2))))
+ [size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
primitives (r.list size _primitive.primitive)
- choice (|> r.nat (\ ! map (n.% size)))
+ choice (|> r.nat (\ ! each (n.% size)))
[_ +valueC] _primitive.primitive
- .let [tupleT (type.tuple (list\map product.left primitives))
+ .let [tupleT (type.tuple (list\each product.left primitives))
[singletonT singletonC] (|> primitives (list.item choice) maybe.trusted)
+primitives (list.together (list (list.first choice primitives)
(list [(#.Parameter 1) +valueC])
(list.after choice primitives)))
- +tupleT (type.tuple (list\map product.left +primitives))]]
+ +tupleT (type.tuple (list\each product.left +primitives))]]
(<| (_.context (%.name (name_of /.product)))
($_ _.and
(_.test "Can analyse."
(|> (//type.with_type tupleT
- (/.product archive.empty _primitive.phase (list\map product.right primitives)))
+ (/.product archive.empty _primitive.phase (list\each product.right primitives)))
(phase.result _primitive.state)
(case> (#try.Success tupleA)
(correct_size? size tupleA)
@@ -194,7 +194,7 @@
false)))
(_.test "Can infer."
(|> (//type.with_inference
- (/.product archive.empty _primitive.phase (list\map product.right primitives)))
+ (/.product archive.empty _primitive.phase (list\each product.right primitives)))
(phase.result _primitive.state)
(case> (#try.Success [_type tupleA])
(and (check.subsumes? tupleT _type)
@@ -210,9 +210,9 @@
(|> (do phase.monad
[[_ varT] (//type.with_env check.var)
_ (//type.with_env
- (check.check varT (type.tuple (list\map product.left primitives))))]
+ (check.check varT (type.tuple (list\each product.left primitives))))]
(//type.with_type varT
- (/.product archive.empty _primitive.phase (list\map product.right primitives))))
+ (/.product archive.empty _primitive.phase (list\each product.right primitives))))
(phase.result _primitive.state)
(case> (#try.Success tupleA)
(correct_size? size tupleA)
@@ -221,26 +221,26 @@
false)))
(_.test "Can analyse through existential quantification."
(|> (//type.with_type (type.ex_q 1 +tupleT)
- (/.product archive.empty _primitive.phase (list\map product.right +primitives)))
+ (/.product archive.empty _primitive.phase (list\each product.right +primitives)))
check_succeeds))
(_.test "Cannot analyse through universal quantification."
(|> (//type.with_type (type.univ_q 1 +tupleT)
- (/.product archive.empty _primitive.phase (list\map product.right +primitives)))
+ (/.product archive.empty _primitive.phase (list\each product.right +primitives)))
check_fails))
))))
(def: variant
(do {! r.monad}
- [size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2))))
- tags (|> (r.set text.hash size (r.unicode 5)) (\ ! map set.list))
- choice (|> r.nat (\ ! map (n.% size)))
- other_choice (|> r.nat (\ ! map (n.% size)) (r.only (|>> (n.= choice) not)))
+ [size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
+ tags (|> (r.set text.hash size (r.unicode 5)) (\ ! each set.list))
+ choice (|> r.nat (\ ! each (n.% size)))
+ other_choice (|> r.nat (\ ! each (n.% size)) (r.only (|>> (n.= choice) not)))
primitives (r.list size _primitive.primitive)
module_name (r.unicode 5)
type_name (r.unicode 5)
.let [with_name (|>> (#.Named [module_name type_name]))
varT (#.Parameter 1)
- primitivesT (list\map product.left primitives)
+ primitivesT (list\each product.left primitives)
[choiceT choiceC] (maybe.trusted (list.item choice primitives))
[other_choiceT other_choiceC] (maybe.trusted (list.item other_choice primitives))
monoT (type.variant primitivesT)
@@ -277,16 +277,16 @@
(def: record
(do {! r.monad}
- [size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2))))
- tags (|> (r.set text.hash size (r.unicode 5)) (\ ! map set.list))
+ [size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
+ tags (|> (r.set text.hash size (r.unicode 5)) (\ ! each set.list))
primitives (r.list size _primitive.primitive)
module_name (r.unicode 5)
type_name (r.unicode 5)
- choice (|> r.nat (\ ! map (n.% size)))
+ choice (|> r.nat (\ ! each (n.% size)))
.let [varT (#.Parameter 1)
- tagsC (list\map (|>> [module_name] code.tag) tags)
- primitivesT (list\map product.left primitives)
- primitivesC (list\map product.right primitives)
+ tagsC (list\each (|>> [module_name] code.tag) tags)
+ primitivesT (list\each product.left primitives)
+ primitivesC (list\each product.right primitives)
monoT (#.Named [module_name type_name] (type.tuple primitivesT))
recordC (list.zipped/2 tagsC primitivesC)
polyT (|> (type.tuple (list.together (list (list.first choice primitivesT)
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
index 47abe0165..f209a235b 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
@@ -73,9 +73,9 @@
(def: i64
Test
(do {! r.monad}
- [subjectC (|> r.nat (\ ! map code.nat))
- signedC (|> r.int (\ ! map code.int))
- paramC (|> r.nat (\ ! map code.nat))]
+ [subjectC (|> r.nat (\ ! each code.nat))
+ signedC (|> r.int (\ ! each code.int))
+ paramC (|> r.nat (\ ! each code.nat))]
($_ _.and
(_.test "i64 'and'."
(check_success+ "lux i64 and" (list paramC subjectC) Nat))
@@ -100,8 +100,8 @@
(def: int
Test
(do {! r.monad}
- [subjectC (|> r.int (\ ! map code.int))
- paramC (|> r.int (\ ! map code.int))]
+ [subjectC (|> r.int (\ ! each code.int))
+ paramC (|> r.int (\ ! each code.int))]
($_ _.and
(_.test "Can multiply integers."
(check_success+ "lux i64 *" (list paramC subjectC) Int))
@@ -120,9 +120,9 @@
(def: frac
Test
(do {! r.monad}
- [subjectC (|> r.safe_frac (\ ! map code.frac))
- paramC (|> r.safe_frac (\ ! map code.frac))
- encodedC (|> r.safe_frac (\ ! map (|>> %.frac code.text)))]
+ [subjectC (|> r.safe_frac (\ ! each code.frac))
+ paramC (|> r.safe_frac (\ ! each code.frac))
+ encodedC (|> r.safe_frac (\ ! each (|>> %.frac code.text)))]
($_ _.and
(_.test "Can add frac numbers."
(check_success+ "lux f64 +" (list paramC subjectC) Frac))
@@ -155,11 +155,11 @@
(def: text
Test
(do {! r.monad}
- [subjectC (|> (r.unicode 5) (\ ! map code.text))
- paramC (|> (r.unicode 5) (\ ! map code.text))
- replacementC (|> (r.unicode 5) (\ ! map code.text))
- fromC (|> r.nat (\ ! map code.nat))
- toC (|> r.nat (\ ! map code.nat))]
+ [subjectC (|> (r.unicode 5) (\ ! each code.text))
+ paramC (|> (r.unicode 5) (\ ! each code.text))
+ replacementC (|> (r.unicode 5) (\ ! each code.text))
+ fromC (|> r.nat (\ ! each code.nat))
+ toC (|> r.nat (\ ! each code.nat))]
($_ _.and
(_.test "Can test text equivalence."
(check_success+ "lux text =" (list paramC subjectC) Bit))
@@ -180,8 +180,8 @@
(def: io
Test
(do {! r.monad}
- [logC (|> (r.unicode 5) (\ ! map code.text))
- exitC (|> r.int (\ ! map code.int))]
+ [logC (|> (r.unicode 5) (\ ! each code.text))
+ exitC (|> r.int (\ ! each code.int))]
($_ _.and
(_.test "Can log messages to standard output."
(check_success+ "lux io log" (list logC) Any))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
index f7b169ea3..f3eb32f4e 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
@@ -43,7 +43,7 @@
Test
(do {! random.monad}
[maskedA //primitive.primitive
- temp (|> random.nat (\ ! map (n.% 100)))
+ temp (|> random.nat (\ ! each (n.% 100)))
.let [maskA (analysis.control/case
[maskedA
[[(#analysis.Bind temp)
@@ -53,7 +53,7 @@
(|> maskA
(//.phase archive.empty)
(phase.result [///bundle.empty synthesis.init])
- (try\map (//primitive.corresponds? maskedA))
+ (try\each (//primitive.corresponds? maskedA))
(try.default false)))))
(def: let_test
@@ -110,7 +110,7 @@
(def: random_member
(Random synthesis.Member)
(do {! random.monad}
- [lefts (|> random.nat (\ ! map (n.% 10)))
+ [lefts (|> random.nat (\ ! each (n.% 10)))
right? random.bit]
(in (if right?
(#.Right lefts)
@@ -119,7 +119,7 @@
(def: random_path
(Random (analysis.Tuple synthesis.Member))
(do {! random.monad}
- [size_1 (|> random.nat (\ ! map (|>> (n.% 10) ++)))]
+ [size_1 (|> random.nat (\ ! each (|>> (n.% 10) ++)))]
(random.list size_1 ..random_member)))
(def: (get_pattern path)
@@ -131,13 +131,13 @@
(case member
(#.Left lefts)
(analysis.pattern/tuple
- (list\compose (list.repeated lefts (analysis.pattern/unit))
- (list inner (analysis.pattern/unit))))
+ (list\composite (list.repeated lefts (analysis.pattern/unit))
+ (list inner (analysis.pattern/unit))))
(#.Right lefts)
(analysis.pattern/tuple
- (list\compose (list.repeated (++ lefts) (analysis.pattern/unit))
- (list inner)))))
+ (list\composite (list.repeated (++ lefts) (analysis.pattern/unit))
+ (list inner)))))
(#analysis.Bind @member)
(list.reversed path))
@member])))
@@ -146,9 +146,9 @@
Test
(do {! random.monad}
[recordA (|> random.nat
- (\ ! map (|>> analysis.nat))
+ (\ ! each (|>> analysis.nat))
(random.list 10)
- (\ ! map (|>> analysis.tuple)))
+ (\ ! each (|>> analysis.tuple)))
pathA ..random_path
[pattern @member] (get_pattern pathA)
.let [getA (analysis.control/case [recordA [[pattern
@@ -184,12 +184,12 @@
(All [a] (-> (Hash a) (Random a) (Random [a a a a a])))
(|> random_element
(random.set hash 5)
- (\ random.monad map (|>> set.list
- (case> (^ (list s0 s1 s2 s3 s4))
- [s0 s1 s2 s3 s4]
+ (\ random.monad each (|>> set.list
+ (case> (^ (list s0 s1 s2 s3 s4))
+ [s0 s1 s2 s3 s4]
- _
- (undefined))))))
+ _
+ (undefined))))))
(template [<name> <hash> <random> <path> <synthesis> <pattern> <analysis>]
[(def: <name>
@@ -262,7 +262,7 @@
(def: random_tuple
(Random [Path Match])
(do {! random.monad}
- [mid_size (\ ! map (n.% 4) random.nat)
+ [mid_size (\ ! each (n.% 4) random.nat)
value/first (random.unicode 1)
value/mid (random.list mid_size (random.unicode 1))
@@ -290,9 +290,9 @@
branch (: (-> Nat Bit Text Frac Branch)
(function (_ lefts right? value body)
{#analysis.when (if right?
- (analysis.pattern/tuple (list\compose (list.repeated (++ lefts) (analysis.pattern/unit))
- (list (analysis.pattern/text value))))
- (analysis.pattern/tuple ($_ list\compose
+ (analysis.pattern/tuple (list\composite (list.repeated (++ lefts) (analysis.pattern/unit))
+ (list (analysis.pattern/text value))))
+ (analysis.pattern/tuple ($_ list\composite
(list.repeated lefts (analysis.pattern/unit))
(list (analysis.pattern/text value)
(analysis.pattern/unit)))))
@@ -303,15 +303,15 @@
(|> (list.zipped/2 value/mid body/mid)
(#.Item [value/first body/first])
list.enumeration
- (list\map (function (_ [lefts' [value body]])
- (path lefts' false value body)))
+ (list\each (function (_ [lefts' [value body]])
+ (path lefts' false value body)))
list.reversed))
[(branch 0 false value/first body/first)
- (list\compose (|> (list.zipped/2 value/mid body/mid)
- list.enumeration
- (list\map (function (_ [lefts' [value body]])
- (branch (++ lefts') false value body))))
- (list (branch (++ mid_size) true value/last body/last)))]])))
+ (list\composite (|> (list.zipped/2 value/mid body/mid)
+ list.enumeration
+ (list\each (function (_ [lefts' [value body]])
+ (branch (++ lefts') false value body))))
+ (list (branch (++ mid_size) true value/last body/last)))]])))
(def: random_complex
($_ random.either
@@ -328,7 +328,7 @@
(def: case_test
Test
(do {! random.monad}
- [expected_input (\ ! map (|>> .i64 synthesis.i64) random.nat)
+ [expected_input (\ ! each (|>> .i64 synthesis.i64) random.nat)
[expected_path match] ..random_case]
(_.cover [/.synthesize_case]
(|> (/.synthesize_case //.phase archive.empty expected_input match)
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
index 6190c05aa..f66e00492 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
@@ -53,9 +53,9 @@
(list\mix (function (_ arity_1 body)
(case arity_1
0 (#analysis.Function (list) body)
- _ (#analysis.Function ($_ list\compose
- (list\map (|>> #variable.Foreign)
- (list.indices arity_1))
+ _ (#analysis.Function ($_ list\composite
+ (list\each (|>> #variable.Foreign)
+ (list.indices arity_1))
(list (#variable.Local 1)))
body)))
body
@@ -146,7 +146,7 @@
(def: (random_variable arity output?)
(-> Arity Scenario)
(do {! random.monad}
- [register (\ ! map (|>> (n.% arity) ++) random.nat)]
+ [register (\ ! each (|>> (n.% arity) ++) random.nat)]
(in [(not (n.= 0 register))
(synthesis.variable/local register)
(if (n.= arity register)
@@ -176,7 +176,7 @@
text_test (random.unicode 1)
[loop?_input expected_input actual_input] (random_value false)
[loop?_output expected_output actual_output] (random_value output?)
- lefts (|> random.nat (\ ! map (n.% 10)))
+ lefts (|> random.nat (\ ! each (n.% 10)))
right? random.bit
.let [side|member (if right?
(#.Right lefts)
@@ -229,10 +229,10 @@
#analysis.value (#analysis.Bind 2)})
#analysis.then actual_output}
{#analysis.when (analysis.pattern/tuple
- (list\compose (list.repeated lefts (analysis.pattern/unit))
- (if right?
- (list (analysis.pattern/unit) (#analysis.Bind 2))
- (list (#analysis.Bind 2) (analysis.pattern/unit)))))
+ (list\composite (list.repeated lefts (analysis.pattern/unit))
+ (if right?
+ (list (analysis.pattern/unit) (#analysis.Bind 2))
+ (list (#analysis.Bind 2) (analysis.pattern/unit)))))
#analysis.then actual_output})])])))
(def: (random_let arity random_value output?)
@@ -278,7 +278,7 @@
(def: (random_get random_value output?)
(-> Scenario Scenario)
(do {! random.monad}
- [lefts (|> random.nat (\ ! map (n.% 10)))
+ [lefts (|> random.nat (\ ! each (n.% 10)))
right? random.bit
[loop?_record expected_record actual_record] (random_value false)]
(in [loop?_record
@@ -288,10 +288,10 @@
expected_record])
(#analysis.Case actual_record
[{#analysis.when (analysis.pattern/tuple
- (list\compose (list.repeated lefts (analysis.pattern/unit))
- (if right?
- (list (analysis.pattern/unit) (#analysis.Bind 2))
- (list (#analysis.Bind 2) (analysis.pattern/unit)))))
+ (list\composite (list.repeated lefts (analysis.pattern/unit))
+ (if right?
+ (list (analysis.pattern/unit) (#analysis.Bind 2))
+ (list (#analysis.Bind 2) (analysis.pattern/unit)))))
#analysis.then (#analysis.Reference (reference.local 2))}
(list)])])))
@@ -307,11 +307,11 @@
(do {! random.monad}
[resets (random.list arity (random_value false))]
(in [true
- (synthesis.loop/recur (list\map (|>> product.right product.left) resets))
+ (synthesis.loop/recur (list\each (|>> product.right product.left) resets))
(analysis.apply [(#analysis.Reference (case arity
1 (reference.local 0)
_ (reference.foreign 0)))
- (list\map (|>> product.right product.right) resets)])])))
+ (list\each (|>> product.right product.right) resets)])])))
(def: (random_scope arity output?)
(-> Arity Scenario)
@@ -321,13 +321,13 @@
(in [(list\mix (function (_ new old)
(and new old))
true
- (list\map product.left resets))
+ (list\each product.left resets))
(synthesis.loop/scope
{#synthesis.start (++ arity)
- #synthesis.inits (list\map (|>> product.right product.left) resets)
+ #synthesis.inits (list\each (|>> product.right product.left) resets)
#synthesis.iteration expected_output})
(analysis.apply [(..n_abstraction arity actual_output)
- (list\map (|>> product.right product.right) resets)])])))
+ (list\each (|>> product.right product.right) resets)])])))
(def: (random_loop arity random_value output?)
(-> Arity Scenario Scenario)
@@ -342,10 +342,10 @@
Scenario
(do {! random.monad}
[[loop?_output expected_output actual_output] (..random_nat output?)
- arity (|> random.nat (\ ! map (|>> (n.% 5) ++)))
- .let [environment ($_ list\compose
- (list\map (|>> #variable.Foreign)
- (list.indices arity))
+ arity (|> random.nat (\ ! each (|>> (n.% 5) ++)))
+ .let [environment ($_ list\composite
+ (list\each (|>> #variable.Foreign)
+ (list.indices arity))
(list (#variable.Local 1)))]]
(in [true
(synthesis.function/abstraction
@@ -362,16 +362,16 @@
(-> Scenario Scenario)
(do {! random.monad}
[[loop?_abstraction expected_abstraction actual_abstraction] (..random_nat output?)
- arity (|> random.nat (\ ! map (|>> (n.% 5) ++)))
+ arity (|> random.nat (\ ! each (|>> (n.% 5) ++)))
inputs (random.list arity (random_value false))]
(in [(list\mix (function (_ new old)
(and new old))
loop?_abstraction
- (list\map product.left inputs))
+ (list\each product.left inputs))
(synthesis.function/apply [expected_abstraction
- (list\map (|>> product.right product.left) inputs)])
+ (list\each (|>> product.right product.left) inputs)])
(analysis.apply [actual_abstraction
- (list\map (|>> product.right product.right) inputs)])])))
+ (list\each (|>> product.right product.right) inputs)])])))
(def: (random_function random_value output?)
(-> Scenario Scenario)
@@ -418,7 +418,7 @@
(def: random_abstraction
(Random [Synthesis Analysis])
(do {! random.monad}
- [arity (|> random.nat (\ ! map (|>> (n.% 5) ++)))
+ [arity (|> random.nat (\ ! each (|>> (n.% 5) ++)))
[loop? expected_body actual_body] (random_body arity true)]
(in [(..n_function loop? arity expected_body)
(..n_abstraction arity actual_body)])))
@@ -437,7 +437,7 @@
(def: application
Test
(do {! random.monad}
- [arity (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1))))
+ [arity (|> random.nat (\ ! each (|>> (n.% 10) (n.max 1))))
funcA //primitive.primitive
argsA (random.list arity //primitive.primitive)]
(_.cover [/.apply]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
index 41dff47e9..63212fe0a 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
@@ -31,13 +31,13 @@
(`` ($_ random.either
(~~ (template [<synthesis> <random>]
[(do {! random.monad}
- [example (\ ! map (|>> <synthesis>) <random>)]
+ [example (\ ! each (|>> <synthesis>) <random>)]
(in [next
[example
example]]))]
[//.bit random.bit]
- [//.i64 (\ ! map .i64 random.nat)]
+ [//.i64 (\ ! each .i64 random.nat)]
[//.f64 random.frac]
[//.text (random.unicode 1)]
))
@@ -55,7 +55,7 @@
(def: (variable offset arity next)
(Scenario Variable)
(let [local (do {! random.monad}
- [register (\ ! map (|>> (n.% arity) ++) random.nat)]
+ [register (\ ! each (|>> (n.% arity) ++) random.nat)]
(in [next
[(#variable.Local (/.register_optimization offset register))
(#variable.Local register)]]))]
@@ -64,7 +64,7 @@
_ ($_ random.either
local
(do {! random.monad}
- [foreign (\ ! map (n.% offset) random.nat)]
+ [foreign (\ ! each (n.% offset) random.nat)]
(in [next
[(#variable.Local foreign)
(#variable.Foreign foreign)]]))))))
@@ -117,19 +117,19 @@
//.path/pop]])
(~~ (template [<path> <random>]
[(do {! random.monad}
- [example (\ ! map (|>> <path>) <random>)]
+ [example (\ ! each (|>> <path>) <random>)]
(in [next
[example
example]]))]
[//.path/bit random.bit]
- [//.path/i64 (\ ! map .i64 random.nat)]
+ [//.path/i64 (\ ! each .i64 random.nat)]
[//.path/f64 random.frac]
[//.path/text (random.unicode 1)]
))
(~~ (template [<path>]
[(do {! random.monad}
- [example (\ ! map (|>> <path>)
+ [example (\ ! each (|>> <path>)
(random.or random.nat
random.nat))]
(in [next
@@ -182,7 +182,7 @@
($_ random.either
(do {! random.monad}
[[next [recordE recordA]] (..reference offset arity next)
- path_length (\ ! map (|>> (n.% 5) ++) random.nat)
+ path_length (\ ! each (|>> (n.% 5) ++) random.nat)
path (random.list path_length random_member)]
(in [next
[(//.branch/get [path recordE])
@@ -219,7 +219,7 @@
(do {! random.monad}
[[next [firstE firstA]] (..variable offset arity next)
[next [secondE secondA]] (..variable offset arity next)
- arity (\ ! map (n.max 1) random.nat)
+ arity (\ ! each (n.max 1) random.nat)
[next [bodyE bodyA]] (..primitive 0 arity next)]
(in [next
[(//.function/abstraction
@@ -266,17 +266,17 @@
(<| (_.covering /._)
($_ _.and
(do {! random.monad}
- [expected_offset (\ ! map (|>> (n.% 5) (n.+ 2)) random.nat)
- arity (\ ! map (|>> (n.% 5) ++) random.nat)
+ [expected_offset (\ ! each (|>> (n.% 5) (n.+ 2)) random.nat)
+ arity (\ ! each (|>> (n.% 5) ++) random.nat)
expected_inits (|> random.nat
- (\ ! map (|>> .i64 //.i64))
+ (\ ! each (|>> .i64 //.i64))
(random.list arity))
[_ [expected iteration]] (..scenario expected_offset arity 0)]
(_.cover [/.Transform /.optimization /.register_optimization]
(case (/.optimization true expected_offset expected_inits
{#//.environment (|> expected_offset
list.indices
- (list\map (|>> #variable.Local)))
+ (list\each (|>> #variable.Local)))
#//.arity arity
#//.body iteration})
(^ (#.Some (//.loop/scope [actual_offset actual_inits
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux
index 3a1101011..ec1a6f641 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux
@@ -89,8 +89,8 @@
[#////analysis.Unit #////synthesis.Text (r\in ////synthesis.unit)]
[#////analysis.Bit #////synthesis.Bit r.bit]
- [#////analysis.Nat #////synthesis.I64 (r\map .i64 r.nat)]
- [#////analysis.Int #////synthesis.I64 (r\map .i64 r.int)]
- [#////analysis.Rev #////synthesis.I64 (r\map .i64 r.rev)]
+ [#////analysis.Nat #////synthesis.I64 (r\each .i64 r.nat)]
+ [#////analysis.Int #////synthesis.I64 (r\each .i64 r.int)]
+ [#////analysis.Rev #////synthesis.I64 (r\each .i64 r.rev)]
[#////analysis.Frac #////synthesis.F64 r.frac]
[#////analysis.Text #////synthesis.Text (r.unicode 5)]))))))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
index 014a77ac2..3c5ff94e7 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
@@ -36,8 +36,8 @@
(def: variant
Test
(do {! r.monad}
- [size (|> r.nat (\ ! map (|>> (n.% 10) (n.+ 2))))
- tagA (|> r.nat (\ ! map (n.% size)))
+ [size (|> r.nat (\ ! each (|>> (n.% 10) (n.+ 2))))
+ tagA (|> r.nat (\ ! each (n.% size)))
.let [right? (n.= (-- size) tagA)
lefts (if right?
(-- tagA)
@@ -59,7 +59,7 @@
(def: tuple
Test
(do {! r.monad}
- [size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2))))
+ [size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
membersA (r.list size //primitive.primitive)]
(_.test "Can synthesize tuple."
(|> (////analysis.tuple membersA)
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
index 690ac7ce2..e817d05c5 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
@@ -50,7 +50,7 @@
(<synthesis> value)])))]
[bit_scenario synthesis.bit random.bit]
- [i64_scenario synthesis.i64 (\ ! map .i64 random.nat)]
+ [i64_scenario synthesis.i64 (\ ! each .i64 random.nat)]
[f64_scenario synthesis.f64 random.frac]
[text_scenario synthesis.text (random.unicode 1)]
)
@@ -97,8 +97,8 @@
(Scenario Synthesis)
(let [registers (dictionary.entries (value@ #necessary context))]
(\ random.monad in
- [(synthesis.tuple (list\map (|>> product.left synthesis.variable/local) registers))
- (synthesis.tuple (list\map (|>> product.right synthesis.variable/local) registers))])))
+ [(synthesis.tuple (list\each (|>> product.left synthesis.variable/local) registers))
+ (synthesis.tuple (list\each (|>> product.right synthesis.variable/local) registers))])))
(def: (structure_scenario context)
(Scenario Synthesis)
@@ -143,7 +143,7 @@
(def: (get_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
(do {! random.monad}
- [length (\ ! map (|>> (n.% 5) ++) random.nat)
+ [length (\ ! each (|>> (n.% 5) ++) random.nat)
path (random.list length ..random_member)
[expected_record actual_record] (scenario context)]
(in [(synthesis.branch/get [path expected_record])
@@ -187,7 +187,7 @@
(#synthesis.Then actual_then))]))]
[#synthesis.Bit random.bit]
- [#synthesis.I64 (\ ! map .i64 random.nat)]
+ [#synthesis.I64 (\ ! each .i64 random.nat)]
[#synthesis.F64 random.frac]
[#synthesis.Text (random.unicode 1)]
)))
@@ -251,16 +251,16 @@
necessary
(list.enumeration inits)))
context))]
- (in [(synthesis.loop/scope [real_start (list\map product.left inits) expected_iteration])
- (synthesis.loop/scope [fake_start (list\map product.right inits) actual_iteration])])))
+ (in [(synthesis.loop/scope [real_start (list\each product.left inits) expected_iteration])
+ (synthesis.loop/scope [fake_start (list\each product.right inits) actual_iteration])])))
(def: (recur_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
(do {! random.monad}
[_ (in [])
resets (random.list ..scope_arity (scenario context))]
- (in [(synthesis.loop/recur (list\map product.left resets))
- (synthesis.loop/recur (list\map product.right resets))])))
+ (in [(synthesis.loop/recur (list\each product.left resets))
+ (synthesis.loop/recur (list\each product.right resets))])))
(def: (loop_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
@@ -274,8 +274,8 @@
(do {! random.monad}
[_ (in [])
.let [registers (dictionary.entries (value@ #necessary context))
- expected_environment (list\map (|>> product.left #variable.Local) registers)
- actual_environment (list\map (|>> product.right #variable.Local) registers)]
+ expected_environment (list\each (|>> product.left #variable.Local) registers)
+ actual_environment (list\each (|>> product.right #variable.Local) registers)]
[expected_body actual_body] (..primitive_scenario context)]
(in [(synthesis.function/abstraction [expected_environment 1 expected_body])
(synthesis.function/abstraction [actual_environment 1 actual_body])])))
@@ -283,12 +283,12 @@
(def: (apply_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
(do {! random.monad}
- [abstraction (\ ! map (|>> synthesis.constant)
+ [abstraction (\ ! each (|>> synthesis.constant)
(random.and (random.unicode 1)
(random.unicode 1)))
inputs (random.list ..scope_arity (scenario context))]
- (in [(synthesis.function/apply [abstraction (list\map product.left inputs)])
- (synthesis.function/apply [abstraction (list\map product.right inputs)])])))
+ (in [(synthesis.function/apply [abstraction (list\each product.left inputs)])
+ (synthesis.function/apply [abstraction (list\each product.right inputs)])])))
(def: (function_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux
index 947170187..9b12fd4a7 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux
@@ -27,7 +27,7 @@
(def: name_part^
(Random Text)
(do {! r.monad}
- [size (|> r.nat (\ ! map (|>> (n.% 20) (n.max 1))))]
+ [size (|> r.nat (\ ! each (|>> (n.% 20) (n.max 1))))]
(r.ascii/lower_alpha size)))
(def: name^
@@ -38,18 +38,18 @@
(Random Code)
(let [numeric^ (: (Random Code)
($_ r.either
- (|> r.bit (r\map code.bit))
- (|> r.nat (r\map code.nat))
- (|> r.int (r\map code.int))
- (|> r.rev (r\map code.rev))
- (|> r.safe_frac (r\map code.frac))))
+ (|> r.bit (r\each code.bit))
+ (|> r.nat (r\each code.nat))
+ (|> r.int (r\each code.int))
+ (|> r.rev (r\each code.rev))
+ (|> r.safe_frac (r\each code.frac))))
textual^ (: (Random Code)
($_ r.either
(do r.monad
- [size (|> r.nat (r\map (n.% 20)))]
- (|> (r.ascii/upper_alpha size) (r\map code.text)))
- (|> name^ (r\map code.identifier))
- (|> name^ (r\map code.tag))))
+ [size (|> r.nat (r\each (n.% 20)))]
+ (|> (r.ascii/upper_alpha size) (r\each code.text)))
+ (|> name^ (r\each code.identifier))
+ (|> name^ (r\each code.tag))))
simple^ (: (Random Code)
($_ r.either
numeric^
@@ -57,16 +57,16 @@
(r.rec
(function (_ code^)
(let [multi^ (do r.monad
- [size (|> r.nat (r\map (n.% 3)))]
+ [size (|> r.nat (r\each (n.% 3)))]
(r.list size code^))
composite^ (: (Random Code)
($_ r.either
- (|> multi^ (r\map code.form))
- (|> multi^ (r\map code.tuple))
+ (|> multi^ (r\each code.form))
+ (|> multi^ (r\each code.tuple))
(do r.monad
- [size (|> r.nat (r\map (n.% 3)))]
+ [size (|> r.nat (r\each (n.% 3)))]
(|> (r.list size (r.and code^ code^))
- (r\map code.record)))))]
+ (r\each code.record)))))]
($_ r.either
simple^
composite^))))))
@@ -110,7 +110,7 @@
(Random Text)
(let [char_gen (|> r.nat (r.only (|>> (n.= (`` (char (~~ (static text.new_line))))) not)))]
(do r.monad
- [size (|> r.nat (r\map (n.% 20)))]
+ [size (|> r.nat (r\each (n.% 20)))]
(r.text char_gen size))))
(def: comment^
diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux
index 65920eca9..e4f567e49 100644
--- a/stdlib/source/test/lux/type.lux
+++ b/stdlib/source/test/lux/type.lux
@@ -38,7 +38,7 @@
(def: short
(Random Text)
(do {! random.monad}
- [size (|> random.nat (\ ! map (n.% 10)))]
+ [size (|> random.nat (\ ! each (n.% 10)))]
(random.unicode size)))
(def: name
@@ -52,24 +52,24 @@
(let [pairG (random.and recur recur)
un_parameterized (: (Random Type)
($_ random.either
- (random\map (|>> #.Primitive) (random.and ..short (random.list 0 recur)))
- (random\map (|>> #.Primitive) (random.and ..short (random.list 1 recur)))
- (random\map (|>> #.Primitive) (random.and ..short (random.list 2 recur)))
- (random\map (|>> #.Sum) pairG)
- (random\map (|>> #.Product) pairG)
- (random\map (|>> #.Function) pairG)
+ (random\each (|>> #.Primitive) (random.and ..short (random.list 0 recur)))
+ (random\each (|>> #.Primitive) (random.and ..short (random.list 1 recur)))
+ (random\each (|>> #.Primitive) (random.and ..short (random.list 2 recur)))
+ (random\each (|>> #.Sum) pairG)
+ (random\each (|>> #.Product) pairG)
+ (random\each (|>> #.Function) pairG)
))]
(case parameters
0 un_parameterized
_ (|> random.nat
- (random\map (|>> (n.% parameters) #.Parameter))
+ (random\each (|>> (n.% parameters) #.Parameter))
(random.either un_parameterized)))))))
(def: .public (random parameters)
(-> Nat (Random Type))
($_ random.either
- (random\map (/.univ_q parameters) (random' parameters))
- (random\map (/.ex_q parameters) (random' parameters))
+ (random\each (/.univ_q parameters) (random' parameters))
+ (random\each (/.ex_q parameters) (random' parameters))
))
(def: .public test
@@ -93,7 +93,7 @@
(_.cover [/.anonymous]
(\ /.equivalence = anonymousT (/.anonymous aliasedT)))))
(do {! random.monad}
- [size (|> random.nat (\ ! map (n.% 3)))
+ [size (|> random.nat (\ ! each (n.% 3)))
members (|> (..random 0)
(random.only (function (_ type)
(case type
@@ -127,7 +127,7 @@
(|> (/.applied (list Bit) Text)
(case> #.None #1 _ #0))))
(do {! random.monad}
- [size (|> random.nat (\ ! map (n.% 3)))
+ [size (|> random.nat (\ ! each (n.% 3)))
members (monad.all ! (list.repeated size (..random 0)))
extra (|> (..random 0)
(random.only (function (_ type)
@@ -149,7 +149,7 @@
(n.= (list.size members) (list.size tparams))))
))
(do {! random.monad}
- [size (|> random.nat (\ ! map (|>> (n.% 3) ++)))
+ [size (|> random.nat (\ ! each (|>> (n.% 3) ++)))
body_type (|> (..random 0)
(random.only (function (_ type)
(case type
@@ -175,7 +175,7 @@
(|> body_type (/.ex_q size) /.quantified?)))
)))
(do {! random.monad}
- [depth (|> random.nat (\ ! map (|>> (n.% 3) ++)))
+ [depth (|> random.nat (\ ! each (|>> (n.% 3) ++)))
element_type (|> (..random 0)
(random.only (function (_ type)
(case type
diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux
index 12370e87a..f4ee4b802 100644
--- a/stdlib/source/test/lux/type/check.lux
+++ b/stdlib/source/test/lux/type/check.lux
@@ -44,24 +44,24 @@
(function (_ recur)
(let [pairG (random.and recur recur)
quantifiedG (random.and (random\in (list)) (type' (++ num_vars)))
- random_pair (random.either (random.either (random\map (|>> #.Sum) pairG)
- (random\map (|>> #.Product) pairG))
- (random.either (random\map (|>> #.Function) pairG)
- (random\map (|>> #.Apply) pairG)))
- random_id (let [random_id (random.either (random\map (|>> #.Var) random.nat)
- (random\map (|>> #.Ex) random.nat))]
+ random_pair (random.either (random.either (random\each (|>> #.Sum) pairG)
+ (random\each (|>> #.Product) pairG))
+ (random.either (random\each (|>> #.Function) pairG)
+ (random\each (|>> #.Apply) pairG)))
+ random_id (let [random_id (random.either (random\each (|>> #.Var) random.nat)
+ (random\each (|>> #.Ex) random.nat))]
(case num_vars
0 random_id
- _ (random.either (random\map (|>> (n.% num_vars) (n.* 2) ++ #.Parameter) random.nat)
+ _ (random.either (random\each (|>> (n.% num_vars) (n.* 2) ++ #.Parameter) random.nat)
random_id)))
- random_quantified (random.either (random\map (|>> #.UnivQ) quantifiedG)
- (random\map (|>> #.ExQ) quantifiedG))]
+ random_quantified (random.either (random\each (|>> #.UnivQ) quantifiedG)
+ (random\each (|>> #.ExQ) quantifiedG))]
($_ random.either
- (random\map (|>> #.Primitive) (random.and ..short (random\in (list))))
+ (random\each (|>> #.Primitive) (random.and ..short (random\in (list))))
random_pair
random_id
random_quantified
- (random\map (|>> #.Named) (random.and ..name (type' 0)))
+ (random\each (|>> #.Named) (random.and ..name (type' 0)))
)))))
(def: type
@@ -416,11 +416,11 @@
(-> Nat (/.Check [Type (List Type) Type]))
(do {! /.monad}
[[id/head var/head] /.var
- var/tail+ (monad.map ! (function (_ _)
- (do !
- [[id/T var/tail] /.var]
- (in var/tail)))
- (list.repeated tail_size /.var))
+ var/tail+ (monad.each ! (function (_ _)
+ (do !
+ [[id/T var/tail] /.var]
+ (in var/tail)))
+ (list.repeated tail_size /.var))
var/last (monad.mix ! (function (_ var/next var/prev)
(do !
[_ (/.check var/prev var/next)]
@@ -439,8 +439,8 @@
(succeeds? (do {! /.monad}
[[var/head var/tail+ var/last] (..build_ring tail_size)
_ (/.check var/head nominal/0)
- failures (monad.map ! (|>> (/.check nominal/1) ..verdict) (list& var/head var/tail+))
- successes (monad.map ! (|>> (/.check nominal/0) ..verdict) (list& var/head var/tail+))]
+ failures (monad.each ! (|>> (/.check nominal/1) ..verdict) (list& var/head var/tail+))
+ successes (monad.each ! (|>> (/.check nominal/0) ..verdict) (list& var/head var/tail+))]
(/.assertion "" (and (list.every? (bit\= false) failures)
(list.every? (bit\= true) successes)))))
@@ -450,10 +450,10 @@
[var/head/1 var/tail+/1 var/last/1] (..build_ring tail_size)
_ (/.check var/head/0 var/head/1)
_ (/.check var/head/0 nominal/0)
- .let [all_variables (list\compose (list& var/head/0 var/tail+/0)
- (list& var/head/1 var/tail+/1))]
- failures (monad.map ! (|>> (/.check nominal/1) ..verdict) all_variables)
- successes (monad.map ! (|>> (/.check nominal/0) ..verdict) all_variables)]
+ .let [all_variables (list\composite (list& var/head/0 var/tail+/0)
+ (list& var/head/1 var/tail+/1))]
+ failures (monad.each ! (|>> (/.check nominal/1) ..verdict) all_variables)
+ successes (monad.each ! (|>> (/.check nominal/0) ..verdict) all_variables)]
(/.assertion "" (and (list.every? (bit\= false) failures)
(list.every? (bit\= true) successes)))))]
(and can_create_rings_of_variables!
@@ -616,7 +616,7 @@
[parameter/0 parameter/1] (..non_twins type\= ..nominal)
left_name ..name
right_name ..name
- ring_tail_size (\ ! map (n.% 10) random.nat)]
+ ring_tail_size (\ ! each (n.% 10) random.nat)]
(_.cover [/.check]
(and (..handles_nominal_types! name/0 name/1 parameter/0 parameter/1)
(..handles_products! name/0 name/1)
@@ -636,9 +636,9 @@
(random.rec
(function (_ dirty_type)
(`` ($_ random.either
- (random\map (function (_ id)
- (function.constant (#.Ex id)))
- random.nat)
+ (random\each (function (_ id)
+ (function.constant (#.Ex id)))
+ random.nat)
(do random.monad
[module (random.ascii/upper 10)
short (random.ascii/upper 10)
diff --git a/stdlib/source/test/lux/type/implicit.lux b/stdlib/source/test/lux/type/implicit.lux
index f50bd57e7..2e694abf1 100644
--- a/stdlib/source/test/lux/type/implicit.lux
+++ b/stdlib/source/test/lux/type/implicit.lux
@@ -25,7 +25,7 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [.let [digit (\ ! map (n.% 10) random.nat)]
+ [.let [digit (\ ! each (n.% 10) random.nat)]
left digit
right digit
.let [start (n.min left right)
@@ -39,8 +39,8 @@
(let [(^open "list\.") (list.equivalence n.equivalence)]
(and (bit\= (\ n.equivalence = left right)
(/.\\ = left right))
- (list\= (\ list.functor map ++ (enum.range n.enum start end))
- (/.\\ map ++ (enum.range n.enum start end)))))
+ (list\= (\ list.functor each ++ (enum.range n.enum start end))
+ (/.\\ each ++ (enum.range n.enum start end)))))
second_order!
(/.\\ =
@@ -48,7 +48,7 @@
(enum.range n.enum start end))
third_order!
- (let [lln (/.\\ map (enum.range n.enum start)
+ (let [lln (/.\\ each (enum.range n.enum start)
(enum.range n.enum start end))]
(/.\\ = lln lln))]
(and first_order!
@@ -56,9 +56,9 @@
third_order!)))
(_.cover [/.with]
(/.with [n.addition]
- (n.= (\ n.addition compose left right)
- (/.\\ compose left right))))
+ (n.= (\ n.addition composite left right)
+ (/.\\ composite left right))))
(_.cover [/.implicit:]
- (n.= (\ n.multiplication compose left right)
- (/.\\ compose left right)))
+ (n.= (\ n.multiplication composite left right)
+ (/.\\ composite left right)))
))))
diff --git a/stdlib/source/test/lux/type/poly/equivalence.lux b/stdlib/source/test/lux/type/poly/equivalence.lux
index 14c763226..5d1953a52 100644
--- a/stdlib/source/test/lux/type/poly/equivalence.lux
+++ b/stdlib/source/test/lux/type/poly/equivalence.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux (#- Variant)
+ [lux (#- Variant Record)
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
@@ -25,24 +25,27 @@
[poly (#+ derived:)]]]])
(type: Variant
- (#Case0 Bit)
- (#Case1 Int)
- (#Case2 Frac))
+ (.Variant
+ (#Case0 Bit)
+ (#Case1 Int)
+ (#Case2 Frac)))
(type: #rec Recursive
- (#Number Frac)
- (#Addition Frac Recursive))
+ (.Variant
+ (#Number Frac)
+ (#Addition Frac Recursive)))
(type: Record
- {#bit Bit
- #int Int
- #frac Frac
- #text Text
- #maybe (Maybe Int)
- #list (List Int)
- #variant Variant
- #tuple [Int Frac Text]
- #recursive Recursive})
+ (.Record
+ {#bit Bit
+ #int Int
+ #frac Frac
+ #text Text
+ #maybe (Maybe Int)
+ #list (List Int)
+ #variant Variant
+ #tuple [Int Frac Text]
+ #recursive Recursive}))
(def: gen_recursive
(Random Recursive)
@@ -54,8 +57,8 @@
(def: random
(Random Record)
(do {! random.monad}
- [size (\ ! map (n.% 2) random.nat)
- .let [gen_int (|> random.int (\ ! map (|>> i.abs (i.% +1,000,000))))]]
+ [size (\ ! each (n.% 2) random.nat)
+ .let [gen_int (|> random.int (\ ! each (|>> i.abs (i.% +1,000,000))))]]
($_ random.and
random.bit
gen_int
diff --git a/stdlib/source/test/lux/type/poly/json.lux b/stdlib/source/test/lux/type/poly/json.lux
index 16a466ed5..8e09a998a 100644
--- a/stdlib/source/test/lux/type/poly/json.lux
+++ b/stdlib/source/test/lux/type/poly/json.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux (#- Variant)
+ [lux (#- Variant Record)
["_" test (#+ Test)]
["." debug]
[abstract
@@ -49,28 +49,31 @@
]]])
(type: Variant
- (#Bit Bit)
- (#Text Text)
- (#Frac Frac))
+ (.Variant
+ (#Bit Bit)
+ (#Text Text)
+ (#Frac Frac)))
(type: #rec Recursive
- (#Number Frac)
- (#Addition Frac Recursive))
+ (.Variant
+ (#Number Frac)
+ (#Addition Frac Recursive)))
(type: Record
- {#bit Bit
- #frac Frac
- #text Text
- #maybe (Maybe Frac)
- #list (List Frac)
- #dictionary (d.Dictionary Text Frac)
- #variant Variant
- #tuple [Bit Text Frac]
- #recursive Recursive
- ... #instant ti.Instant
- ... #duration tdu.Duration
- #date tda.Date
- #grams (unit.Qty unit.Gram)})
+ (.Record
+ {#bit Bit
+ #frac Frac
+ #text Text
+ #maybe (Maybe Frac)
+ #list (List Frac)
+ #dictionary (d.Dictionary Text Frac)
+ #variant Variant
+ #tuple [Bit Text Frac]
+ #recursive Recursive
+ ... #instant ti.Instant
+ ... #duration tdu.Duration
+ #date tda.Date
+ #grams (unit.Qty unit.Gram)}))
(def: gen_recursive
(Random Recursive)
@@ -82,12 +85,12 @@
(def: qty
(All [unit] (Random (unit.Qty unit)))
- (\ random.monad map (debug.private unit.in) random.int))
+ (\ random.monad each (debug.private unit.in) random.int))
(def: gen_record
(Random Record)
(do {! random.monad}
- [size (\ ! map (n.% 2) random.nat)]
+ [size (\ ! each (n.% 2) random.nat)]
($_ random.and
random.bit
random.safe_frac
diff --git a/stdlib/source/test/lux/type/quotient.lux b/stdlib/source/test/lux/type/quotient.lux
index 3233777c4..806187b03 100644
--- a/stdlib/source/test/lux/type/quotient.lux
+++ b/stdlib/source/test/lux/type/quotient.lux
@@ -18,7 +18,7 @@
(def: .public (random class super)
(All [t c %] (-> (/.Class t c %) (Random t) (Random (/.Quotient t c %))))
- (\ random.monad map (/.quotient class) super))
+ (\ random.monad each (/.quotient class) super))
(def: mod_10_class
(/.class (|>> (n.% 10) %.nat)))
diff --git a/stdlib/source/test/lux/type/refinement.lux b/stdlib/source/test/lux/type/refinement.lux
index 5942e2a84..6721399e7 100644
--- a/stdlib/source/test/lux/type/refinement.lux
+++ b/stdlib/source/test/lux/type/refinement.lux
@@ -29,10 +29,10 @@
(_.for [/.Refined])
(do {! random.monad}
[raw random.nat
- modulus (\ ! map (|>> (n.% 10) (n.+ 2)) random.nat)
+ modulus (\ ! each (|>> (n.% 10) (n.+ 2)) random.nat)
.let [predicate (: (Predicate Nat)
(|>> (n.% modulus) (n.= 0)))]
- total_raws (\ ! map (|>> (n.% 20) ++) random.nat)
+ total_raws (\ ! each (|>> (n.% 20) ++) random.nat)
raws (random.list total_raws random.nat)]
($_ _.and
(_.for [/.Refiner]
@@ -46,23 +46,23 @@
(not (predicate raw))))
(_.cover [/.predicate]
(|> (/.refiner predicate modulus)
- (maybe\map (|>> /.predicate (same? predicate)))
+ (maybe\each (|>> /.predicate (same? predicate)))
(maybe.else false)))
))
(_.cover [/.value]
(|> (/.refiner predicate modulus)
- (maybe\map (|>> /.value (n.= modulus)))
+ (maybe\each (|>> /.value (n.= modulus)))
(maybe.else false)))
(_.cover [/.lifted]
(and (|> (/.refiner predicate modulus)
- (maybe\map (/.lifted (n.+ modulus)))
- maybe\join
- (maybe\map (|>> /.value (n.= (n.+ modulus modulus))))
+ (maybe\each (/.lifted (n.+ modulus)))
+ maybe\conjoint
+ (maybe\each (|>> /.value (n.= (n.+ modulus modulus))))
(maybe.else false))
(|> (/.refiner predicate modulus)
- (maybe\map (/.lifted (n.+ (++ modulus))))
- maybe\join
- (maybe\map (|>> /.value (n.= (n.+ modulus (++ modulus)))))
+ (maybe\each (/.lifted (n.+ (++ modulus))))
+ maybe\conjoint
+ (maybe\each (|>> /.value (n.= (n.+ modulus (++ modulus)))))
(maybe.else false)
not)))
(_.cover [/.only]
@@ -72,7 +72,7 @@
(list.size actual))
(\ (list.equivalence n.equivalence) =
expected
- (list\map /.value actual)))))
+ (list\each /.value actual)))))
(_.cover [/.partition]
(let [expected (list.only predicate raws)
[actual alternative] (/.partition (/.refiner predicate) raws)]
@@ -82,7 +82,7 @@
(list.size alternative))
(\ (list.equivalence n.equivalence) =
expected
- (list\map /.value actual)))))
+ (list\each /.value actual)))))
(_.cover [/.type]
(exec (: (Maybe .._type)
(.._refiner raw))
diff --git a/stdlib/source/test/lux/type/resource.lux b/stdlib/source/test/lux/type/resource.lux
index 88ed4b815..206aa3506 100644
--- a/stdlib/source/test/lux/type/resource.lux
+++ b/stdlib/source/test/lux/type/resource.lux
@@ -29,8 +29,8 @@
(def: pure
Test
(monad.do {! random.monad}
- [pre (\ ! map %.nat random.nat)
- post (\ ! map %.nat random.nat)
+ [pre (\ ! each %.nat random.nat)
+ post (\ ! each %.nat random.nat)
.let [! identity.monad]]
(_.for [/.Linear /.run! /.monad]
(`` ($_ _.and
@@ -71,8 +71,8 @@
(def: sync
Test
(monad.do {! random.monad}
- [pre (\ ! map %.nat random.nat)
- post (\ ! map %.nat random.nat)
+ [pre (\ ! each %.nat random.nat)
+ post (\ ! each %.nat random.nat)
.let [! io.monad]]
(_.for [/.Linear /.run! /.monad]
(`` ($_ _.and
@@ -114,8 +114,8 @@
(def: async
Test
(monad.do {! random.monad}
- [pre (\ ! map %.nat random.nat)
- post (\ ! map %.nat random.nat)
+ [pre (\ ! each %.nat random.nat)
+ post (\ ! each %.nat random.nat)
.let [! async.monad]]
(_.for [/.Linear /.run! /.monad]
(`` ($_ _.and
diff --git a/stdlib/source/test/lux/type/unit.lux b/stdlib/source/test/lux/type/unit.lux
index a3edb2b19..1e1992551 100644
--- a/stdlib/source/test/lux/type/unit.lux
+++ b/stdlib/source/test/lux/type/unit.lux
@@ -26,9 +26,9 @@
[(def: (<name> range)
(-> Nat (Random (/.Qty <type>)))
(|> random.int
- (\ random.monad map (i.% (.int range)))
+ (\ random.monad each (i.% (.int range)))
(random.only (|>> (i.= +0) not))
- (\ random.monad map (\ <unit> in))))]
+ (\ random.monad each (\ <unit> in))))]
[meter /.Meter /.meter]
[second /.Second /.second]
@@ -78,7 +78,7 @@
)))))
(syntax: (natural [])
- (\ meta.monad map
+ (\ meta.monad each
(|>> code.nat list)
meta.seed))
@@ -95,18 +95,18 @@
Test
(do {! random.monad}
[small (|> random.int
- (\ ! map (i.% +1,000))
- (\ ! map (\ /.meter in)))
+ (\ ! each (i.% +1,000))
+ (\ ! each (\ /.meter in)))
large (|> random.int
- (\ ! map (i.% +1,000))
- (\ ! map (i.* +1,000,000,000))
- (\ ! map (\ /.meter in)))
+ (\ ! each (i.% +1,000))
+ (\ ! each (i.* +1,000,000,000))
+ (\ ! each (\ /.meter in)))
.let [(^open "meter\.") (: (Equivalence (/.Qty /.Meter))
/.equivalence)]
unscaled (|> random.int
- (\ ! map (i.% +1,000))
- (\ ! map (i.* (.int how::to)))
- (\ ! map (\ /.meter in)))]
+ (\ ! each (i.% +1,000))
+ (\ ! each (i.* (.int how::to)))
+ (\ ! each (\ /.meter in)))]
(_.for [/.Scale]
(`` ($_ _.and
(~~ (template [<type> <scale>]
diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux
index 0e7369716..617461ad6 100644
--- a/stdlib/source/test/lux/world/file/watch.lux
+++ b/stdlib/source/test/lux/world/file/watch.lux
@@ -95,7 +95,7 @@
[_ (\ fs make_directory directory)
_ (\ watcher start /.all directory)]
(|> (\ watcher poll [])
- (\ ! map list.empty?))))
+ (\ ! each list.empty?))))
(def: (after_creation! fs watcher expected_path)
(-> (//.System Async) (/.Watcher Async) //.Path (Async (Try Bit)))
@@ -161,7 +161,7 @@
[directory (random.ascii/alpha 5)
.let [/ "/"
[fs watcher] (/.mock /)]
- expected_path (\ ! map (|>> (format directory /))
+ expected_path (\ ! each (|>> (format directory /))
(random.ascii/alpha 5))
data ($binary.random 10)]
(in (do {! async.monad}
diff --git a/stdlib/source/test/lux/world/input/keyboard.lux b/stdlib/source/test/lux/world/input/keyboard.lux
index 865a66a9d..727ea70cf 100644
--- a/stdlib/source/test/lux/world/input/keyboard.lux
+++ b/stdlib/source/test/lux/world/input/keyboard.lux
@@ -140,7 +140,7 @@
(Random /.Key)
(let [count (list.size ..listing)]
(do {! random.monad}
- [choice (\ ! map (n.% count) random.nat)]
+ [choice (\ ! each (n.% count) random.nat)]
(in (maybe.trusted (list.item choice ..listing))))))
(def: .public test
diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux
index 994e2cbf3..cdac7ac43 100644
--- a/stdlib/source/test/lux/world/net/http/client.lux
+++ b/stdlib/source/test/lux/world/net/http/client.lux
@@ -41,7 +41,7 @@
on_connect random.nat
on_options random.nat
on_trace random.nat
- num_headers (\ ! map (nat.% 10) random.nat)
+ num_headers (\ ! each (nat.% 10) random.nat)
headers (random.dictionary text.hash num_headers (random.ascii/lower 3) (random.ascii/lower 3))
.let [mock (: (/.Client IO)
(implementation
diff --git a/stdlib/source/test/lux/world/output/video/resolution.lux b/stdlib/source/test/lux/world/output/video/resolution.lux
index b6b18505a..fa52ce52c 100644
--- a/stdlib/source/test/lux/world/output/video/resolution.lux
+++ b/stdlib/source/test/lux/world/output/video/resolution.lux
@@ -47,7 +47,7 @@
(Random /.Resolution)
(let [count (list.size ..listing)]
(do {! random.monad}
- [choice (\ ! map (n.% count) random.nat)]
+ [choice (\ ! each (n.% count) random.nat)]
(in (maybe.trusted (list.item choice ..listing))))))
(def: .public test
diff --git a/stdlib/source/test/lux/world/program.lux b/stdlib/source/test/lux/world/program.lux
index 6f5784daf..05dcac52a 100644
--- a/stdlib/source/test/lux/world/program.lux
+++ b/stdlib/source/test/lux/world/program.lux
@@ -42,7 +42,7 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [env_size (\ ! map (|>> (n.% 10) ++) random.nat)
+ [env_size (\ ! each (|>> (n.% 10) ++) random.nat)
environment (..environment env_size)
home ..path
directory ..path
@@ -63,7 +63,7 @@
(list.every? (function (_ [key value])
(|> environment
(dictionary.value key)
- (maybe\map (text\= value))
+ (maybe\each (text\= value))
(maybe.else false)))))))))))
(_.cover [/.unknown_environment_variable]
(let [program (/.mock environment home directory)]