diff options
| author | Eduardo Julian | 2018-01-03 23:57:12 -0400 |
|---|---|---|
| committer | Eduardo Julian | 2018-01-03 23:57:12 -0400 |
| commit | 5c18722100637a61a6e52b4471a2068f37a3dcff (patch) | |
| tree | 9c49e2599409293db78174299094be1e0202b6cb /stdlib/source/lux.lux | |
| parent | 91a14e9b4c6611399d33166710081982cf984a00 (diff) | |
- Small refactorings.
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/%] + ) |
