aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test/test/lux/data/struct/vector.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/test/test/lux/data/struct/vector.lux')
-rw-r--r--stdlib/test/test/lux/data/struct/vector.lux19
1 files changed, 6 insertions, 13 deletions
diff --git a/stdlib/test/test/lux/data/struct/vector.lux b/stdlib/test/test/lux/data/struct/vector.lux
index 2ccfa2fc1..c3f3a706e 100644
--- a/stdlib/test/test/lux/data/struct/vector.lux
+++ b/stdlib/test/test/lux/data/struct/vector.lux
@@ -35,10 +35,8 @@
(=+ size (&;size sample))))
(assert "Can add and remove elements to vectors."
- (and (=+ (inc+ size)
- (&;size (&;add non-member sample)))
- (=+ (dec+ size)
- (&;size (&;pop sample)))))
+ (and (=+ (inc+ size) (&;size (&;add non-member sample)))
+ (=+ (dec+ size) (&;size (&;pop sample)))))
(assert "Can put and get elements into vectors."
(|> sample
@@ -49,16 +47,12 @@
(assert "Can update elements of vectors."
(|> sample
- (&;put idx non-member)
- (&;update idx inc+)
- (&;at idx)
- (default (undefined))
+ (&;put idx non-member) (&;update idx inc+)
+ (&;at idx) (default (undefined))
(=+ (inc+ non-member))))
(assert "Can safely transform to/from lists."
- (|> sample
- &;to-list &;from-list
- (&/= sample)))
+ (|> sample &;to-list &;from-list (&/= sample)))
(assert "Can identify members of a vector."
(and (not (&;member? number;Eq<Nat> sample non-member))
@@ -76,8 +70,7 @@
(assert "Applicative allows you to create singleton vectors, and apply vectors of functions to vectors of values."
(and (&/= (&;vector non-member) (&/wrap non-member))
- (&/= (&/map inc+ sample)
- (&/apply (&/wrap inc+) sample))))
+ (&/= (&/map inc+ sample) (&/apply (&/wrap inc+) sample))))
(assert "Vector concatenation is a monad."
(&/= (&/append sample other-sample)