From 5c18722100637a61a6e52b4471a2068f37a3dcff Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 3 Jan 2018 23:57:12 -0400 Subject: - Small refactorings. --- stdlib/source/lux.lux | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'stdlib/source/lux.lux') diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 51e9af4dc..6e08c9cea 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -5112,6 +5112,9 @@ [deg-to-frac "lux deg to-frac" Deg Frac] ) +(def: #export frac-to-nat (|>> frac-to-int int-to-nat)) +(def: #export nat-to-frac (|>> nat-to-int int-to-frac)) + (def: (repeat n x) (All [a] (-> Int a (List a))) (if (i/> 0 n) @@ -6067,3 +6070,13 @@ (let [shift (if (i/< 0 param) i/- i/+)] (|> raw (shift param))) raw))) + +(do-template [ <%>] + [(def: #export ( param subject) + (-> [ ]) + [( param subject) + (<%> param subject)])] + + [Nat n//% n// n/%] + [Int i//% i// i/%] + ) -- cgit v1.2.3