diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/math/modulus.lux | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/stdlib/source/library/lux/math/modulus.lux b/stdlib/source/library/lux/math/modulus.lux index 4a8daaa97..6a08451e1 100644 --- a/stdlib/source/library/lux/math/modulus.lux +++ b/stdlib/source/library/lux/math/modulus.lux @@ -1,22 +1,22 @@ (.using - [library - [lux "*" - ["[0]" meta] - [abstract - [monad {"+" do}]] - [control - ["[0]" try {"+" Try}] - ["[0]" exception {"+" exception:}] - [parser - ["<[0]>" code]]] - [macro - [syntax {"+" syntax:}] - ["[0]" code]] - [math - [number - ["i" int]]] - [type - abstract]]]) + [library + [lux "*" + ["[0]" meta] + [abstract + [monad {"+" do}]] + [control + ["[0]" try {"+" Try}] + ["[0]" exception {"+" exception:}] + [parser + ["<[0]>" code]]] + [macro + [syntax {"+" syntax:}] + ["[0]" code]] + [math + [number + ["i" int]]] + [type + [abstract {"-" pattern}]]]]) (exception: .public zero_cannot_be_a_modulus) @@ -27,22 +27,22 @@ (Ex (_ %) (-> Int (Try (Modulus %)))) (if (i.= +0 value) (exception.except ..zero_cannot_be_a_modulus []) - {try.#Success (:abstraction value)})) + {try.#Success (abstraction value)})) (def: .public divisor (All (_ %) (-> (Modulus %) Int)) - (|>> :representation)) + (|>> representation)) (def: .public (= reference subject) (All (_ %r %s) (-> (Modulus %r) (Modulus %s) Bit)) - (i.= (:representation reference) - (:representation subject))) + (i.= (representation reference) + (representation subject))) (def: .public (congruent? modulus reference subject) (All (_ %) (-> (Modulus %) Int Int Bit)) (|> subject (i.- reference) - (i.% (:representation modulus)) + (i.% (representation modulus)) (i.= +0))) ) |