aboutsummaryrefslogtreecommitdiffhomepage
path: root/std/Number/Conversion.bruijn
diff options
context:
space:
mode:
Diffstat (limited to 'std/Number/Conversion.bruijn')
-rw-r--r--std/Number/Conversion.bruijn2
1 files changed, 2 insertions, 0 deletions
diff --git a/std/Number/Conversion.bruijn b/std/Number/Conversion.bruijn
index 52f3c9e..01c7e9f 100644
--- a/std/Number/Conversion.bruijn
+++ b/std/Number/Conversion.bruijn
@@ -14,6 +14,8 @@ unary→ternary [0 T.inc (+0t)] ⧗ Unary → Ternary
:test (¹³(+0u)) ((+0t))
:test (¹³(+2u)) ((+2t))
+binary→unary [[0 (+0u) [U.inc (2 0)] 1]] (U.mul (+2u)) ⧗ Binary → Unary
+
# converts ternary numbers to unary
ternary→unary [T.apply 0 U.inc (+0u)] ⧗ Ternary → Unary