diff options
author | Eduardo Julian | 2018-05-23 02:05:12 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-23 02:05:12 -0400 |
commit | 0f32fc8e73681d860d12a5560952ed6640f034f1 (patch) | |
tree | 701a1cf8dfcddf2f13add6758c2954ca27b51ea1 | |
parent | 72950a540be3dc49a107700c77c0195db16a4f58 (diff) |
- Minor improvements.
-rw-r--r-- | stdlib/source/lux.lux | 15 | ||||
-rw-r--r-- | stdlib/source/lux/control/thread.lux | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 5fbbf44b5..d6a399463 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -2395,6 +2395,16 @@ quotient ("lux i64 +" +1 quotient))))) +(def:''' #export (n//% param subject) + (list [(tag$ ["lux" "doc"]) + (text$ "Nat(ural) [division remainder].")]) + (-> Nat Nat (#Product Nat Nat)) + (let' [div (n// param subject) + flat ("lux int *" + ("lux coerce" Int div) + ("lux coerce" Int param))] + [div ("lux i64 -" flat subject)])) + (def:''' #export (n/% param subject) (list [(tag$ ["lux" "doc"]) (text$ "Nat(ural) remainder.")]) @@ -6292,8 +6302,9 @@ [(</> param subject) (<%> param subject)])] - [Nat n//% n// n/%] - [Int i//% i// i/%] + [Int i//% i// i/%] + [Deg d//% d// d/%] + [Frac f//% f// f/%] ) (def: to-significand diff --git a/stdlib/source/lux/control/thread.lux b/stdlib/source/lux/control/thread.lux index 7d46f3707..5709b41bb 100644 --- a/stdlib/source/lux/control/thread.lux +++ b/stdlib/source/lux/control/thread.lux @@ -10,7 +10,7 @@ (type: #export (Box t v) {#.doc "A mutable box holding a value."} - (#.Primitive "#Box" (~ (list t v)))) + (#.Primitive "#Box" (#.Cons t (#.Cons v #.Nil)))) (def: #export (box init) (All [a] (-> a (All [!] (Thread ! (Box ! a))))) |