aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/math.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/math.lux')
-rw-r--r--stdlib/source/test/lux/math.lux8
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux
index 17ed2086c..c29b25b97 100644
--- a/stdlib/source/test/lux/math.lux
+++ b/stdlib/source/test/lux/math.lux
@@ -36,7 +36,7 @@
(<| (_.context (%.name (name-of /._)))
($_ _.and
(<| (_.context "Trigonometry")
- (do r.monad
+ (do {@ r.monad}
[angle (|> r.safe-frac (:: @ map (f.* /.tau)))]
($_ _.and
(_.test "Sine and arc-sine are inverse functions."
@@ -47,7 +47,7 @@
(trigonometric-symmetry /.tan /.atan angle))
)))
(<| (_.context "Rounding")
- (do r.monad
+ (do {@ r.monad}
[sample (|> r.safe-frac (:: @ map (f.* +1000.0)))]
($_ _.and
(_.test "The ceiling will be an integer value, and will be >= the original."
@@ -66,12 +66,12 @@
(f.<= +1.0 (f.abs (f.- sample round'd))))))
)))
(<| (_.context "Exponentials and logarithms")
- (do r.monad
+ (do {@ r.monad}
[sample (|> r.safe-frac (:: @ map (f.* +10.0)))]
(_.test "Logarithm is the inverse of exponential."
(|> sample /.exp /.log (within? +0.000000000000001 sample)))))
(<| (_.context "Greatest-Common-Divisor and Least-Common-Multiple")
- (do r.monad
+ (do {@ r.monad}
[#let [gen-nat (|> r.nat (:: @ map (|>> (n.% 1000) (n.max 1))))]
x gen-nat
y gen-nat]