aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/abstract/comonad/cofree.lux24
-rw-r--r--stdlib/source/test/lux/data/collection.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/stream.lux (renamed from stdlib/source/test/lux/data/collection/sequence.lux)10
3 files changed, 19 insertions, 19 deletions
diff --git a/stdlib/source/test/lux/abstract/comonad/cofree.lux b/stdlib/source/test/lux/abstract/comonad/cofree.lux
index dca4680de..285628356 100644
--- a/stdlib/source/test/lux/abstract/comonad/cofree.lux
+++ b/stdlib/source/test/lux/abstract/comonad/cofree.lux
@@ -13,29 +13,29 @@
[data
[collection
["[0]" list]
- ["[0]" sequence {"+" Sequence} ("[1]#[0]" comonad)]]]
+ ["[0]" stream {"+" Stream} ("[1]#[0]" comonad)]]]
[math
["[0]" random]]]]
[\\library
["[0]" /]])
(def: (injection value)
- (Injection (/.CoFree Sequence))
- [value (sequence#each injection (sequence.repeated value))])
+ (Injection (/.CoFree Stream))
+ [value (stream#each injection (stream.repeated value))])
(def: (interpret [head tail])
- (All (_ a) (-> (/.CoFree Sequence a) (Sequence a)))
+ (All (_ a) (-> (/.CoFree Stream a) (Stream a)))
(|> tail
- (sequence#each (# (/.comonad sequence.functor) out))
+ (stream#each (# (/.comonad stream.functor) out))
[head]
//.pending))
(def: comparison
- (Comparison (/.CoFree Sequence))
+ (Comparison (/.CoFree Stream))
(function (_ == left right)
(# (list.equivalence ==) =
- (sequence.first 100 (..interpret left))
- (sequence.first 100 (..interpret right)))))
+ (stream.first 100 (..interpret left))
+ (stream.first 100 (..interpret right)))))
(def: .public test
Test
@@ -43,9 +43,9 @@
(_.for [/.CoFree])
($_ _.and
(_.for [/.functor]
- ($functor.spec ..injection ..comparison (: (Functor (/.CoFree Sequence))
- (/.functor sequence.functor))))
+ ($functor.spec ..injection ..comparison (: (Functor (/.CoFree Stream))
+ (/.functor stream.functor))))
(_.for [/.comonad]
- ($comonad.spec ..injection ..comparison (: (CoMonad (/.CoFree Sequence))
- (/.comonad sequence.functor))))
+ ($comonad.spec ..injection ..comparison (: (CoMonad (/.CoFree Stream))
+ (/.comonad stream.functor))))
)))
diff --git a/stdlib/source/test/lux/data/collection.lux b/stdlib/source/test/lux/data/collection.lux
index 4d7de7ed5..e4caad8c8 100644
--- a/stdlib/source/test/lux/data/collection.lux
+++ b/stdlib/source/test/lux/data/collection.lux
@@ -7,7 +7,7 @@
["[1][0]" bits]
["[1][0]" list]
["[1][0]" row]
- ["[1][0]" sequence]
+ ["[1][0]" stream]
["[1][0]" stack]
["[1][0]" dictionary
["[1]/[0]" ordered]
@@ -59,7 +59,7 @@
/bits.test
/list.test
/row.test
- /sequence.test
+ /stream.test
/stack.test
..dictionary
..queue
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/stream.lux
index 22dc1b37e..bd73a3204 100644
--- a/stdlib/source/test/lux/data/collection/sequence.lux
+++ b/stdlib/source/test/lux/data/collection/stream.lux
@@ -22,7 +22,7 @@
["[0]" /]])
(implementation: (equivalence super)
- (All (_ a) (-> (Equivalence a) (Equivalence (/.Sequence a))))
+ (All (_ a) (-> (Equivalence a) (Equivalence (/.Stream a))))
(def: (= reference subject)
(# (list.equivalence super) =
@@ -32,7 +32,7 @@
(def: (iterations step)
(All (_ a)
(-> (-> a a)
- (-> a (/.Sequence a))))
+ (-> a (/.Stream a))))
(/.iterations
(function (_ state)
(let [state' (step state)]
@@ -41,7 +41,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (_.for [/.Sequence])
+ (_.for [/.Stream])
(let [(^open "list#[0]") (list.equivalence n.equivalence)])
(do [! random.monad]
[repeated random.nat
@@ -115,8 +115,8 @@
(list#= (list.together (list.repeated size cycle))
(/.first (n.* size (list.size cycle))
(/.cycle [cycle_start cycle_next])))))
- (_.cover [/.^sequence&]
- (let [(/.^sequence& first second third next) (..iterations ++ offset)]
+ (_.cover [/.^stream&]
+ (let [(/.^stream& first second third next) (..iterations ++ offset)]
(and (n.= offset first)
(n.= (n.+ 1 offset) second)
(n.= (n.+ 2 offset) third))))