From 36303d6cb2ce3ab9e36d045b9516c997bd461862 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 24 Aug 2021 05:23:45 -0400 Subject: Outsourced the syntax for labelled type definitions to macros. --- stdlib/source/library/lux/math/modular.lux | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'stdlib/source/library/lux/math/modular.lux') diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux index 9a94151c4..acfdbab2d 100644 --- a/stdlib/source/library/lux/math/modular.lux +++ b/stdlib/source/library/lux/math/modular.lux @@ -30,8 +30,9 @@ (abstract: .public (Mod m) {} - {#modulus (Modulus m) - #value Int} + (Record + {#modulus (Modulus m) + #value Int}) (def: .public (modular modulus value) (All [%] (-> (Modulus %) Int (Mod %))) @@ -66,7 +67,7 @@ (def: (encoded modular) (let [[_ value] (:representation modular)] - ($_ text\compose + ($_ text\composite (i\encoded value) ..separator (i\encoded (//.divisor expected))))) @@ -125,7 +126,7 @@ (def: identity (..modular modulus )) - (def: compose + (def: composite ))] [..+ +0 addition] -- cgit v1.2.3