From 30c19b40f5fd583d19aa7cf495a19c1b91f86320 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 24 Jul 2019 23:23:13 -0400 Subject: No more "f/"-prefixed functions. + No more "m/"-prefixed functions.--- stdlib/source/program/licentia/input.lux | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'stdlib/source/program') diff --git a/stdlib/source/program/licentia/input.lux b/stdlib/source/program/licentia/input.lux index 7af7c33d4..6d64515cf 100644 --- a/stdlib/source/program/licentia/input.lux +++ b/stdlib/source/program/licentia/input.lux @@ -8,7 +8,10 @@ [text ["%" format (#+ format)]] [format - ["." json (#+ Reader)]]]] + ["." json (#+ Reader)]] + [number + ["." int] + ["f" frac]]]] [// [license (#+ Identification Termination @@ -39,10 +42,10 @@ (Reader Nat) (do parser.monad [amountF json.number - #let [amountI (frac-to-int amountF)] + #let [amountI (f.int amountF)] _ (parser.assert (ex.construct cannot-use-fractional-amount amountF) - (f/= amountF - (int-to-frac amountI))) + (f.= amountF + (int.frac amountI))) _ (parser.assert (ex.construct cannot-use-negative-amount amountI) (i/> +0 amountI))] (wrap (.nat amountI)))) -- cgit v1.2.3