diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux.lux | 13 |
1 files changed, 13 insertions, 0 deletions
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 [<type> </%> </> <%>] + [(def: #export (</%> param subject) + (-> <type> <type> [<type> <type>]) + [(</> param subject) + (<%> param subject)])] + + [Nat n//% n// n/%] + [Int i//% i// i/%] + ) |