diff options
author | Eduardo Julian | 2018-08-28 22:04:12 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-08-28 22:04:12 -0400 |
commit | ee73994bf7733971561e32a28ac06141dbe0134b (patch) | |
tree | ad33407cb4163adc8b884e386dbc9ccd8c7a7937 /stdlib/source/lux.lux | |
parent | 6e30954da01860c6488eab66216c3c2e97b65ea5 (diff) |
Small additions to stdlib.
Diffstat (limited to 'stdlib/source/lux.lux')
-rw-r--r-- | stdlib/source/lux.lux | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 916b77797..1fb0afe19 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -2228,7 +2228,7 @@ subjectH (high-bits subject)] (if ("lux int <" subjectH testH) #1 - (if ("lux i64 =" testH subjectH) + (if ("lux i64 =" subjectH testH) ("lux int <" (low-bits subject) (low-bits test)) @@ -6206,3 +6206,11 @@ [no yes] [off on] ) + +(def: #export nat-to-frac + (-> Nat Frac) + (|>> ..int ..int-to-frac)) + +(def: #export frac-to-nat + (-> Frac Nat) + (|>> ..frac-to-int ..nat)) |