aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/math/modular.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-08-09 07:12:33 -0400
committerEduardo Julian2020-08-09 07:12:33 -0400
commitb2cec28f75239fd11ab13a6ff896fb0bf0f7a19c (patch)
treed8e53e9d95d47efeeb290a04e0a839b175367f7b /stdlib/source/lux/math/modular.lux
parentbed794b36967e3096c73db0067bac5bb4ffdf814 (diff)
"abstract:" macro now takes annotations after representation type.
Diffstat (limited to 'stdlib/source/lux/math/modular.lux')
-rw-r--r--stdlib/source/lux/math/modular.lux8
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/source/lux/math/modular.lux b/stdlib/source/lux/math/modular.lux
index 882162d5d..c00fceb0c 100644
--- a/stdlib/source/lux/math/modular.lux
+++ b/stdlib/source/lux/math/modular.lux
@@ -22,10 +22,10 @@
(exception: #export zero-cannot-be-a-modulus)
(abstract: #export (Modulus m)
+ Int
+
{#.doc (doc "A number used as a modulus in modular arithmetic."
"It cannot be 0.")}
-
- Int
(def: #export (from-int value)
(Ex [m] (-> Int (Try (Modulus m))))
@@ -69,11 +69,11 @@
(l.and (l.one-of "-+") (l.many l.decimal))))
(abstract: #export (Mod m)
- {#.doc "A number under a modulus."}
-
{#remainder Int
#modulus (Modulus m)}
+ {#.doc "A number under a modulus."}
+
(def: #export (mod modulus)
(All [m] (-> (Modulus m) (-> Int (Mod m))))
(function (_ value)