aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/source/lux.lux15
-rw-r--r--stdlib/source/lux/control/thread.lux2
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)))))