aboutsummaryrefslogtreecommitdiffhomepage
path: root/std/Char.bruijn
diff options
context:
space:
mode:
Diffstat (limited to 'std/Char.bruijn')
-rw-r--r--std/Char.bruijn5
1 files changed, 4 insertions, 1 deletions
diff --git a/std/Char.bruijn b/std/Char.bruijn
index fc517b3..df6c78b 100644
--- a/std/Char.bruijn
+++ b/std/Char.bruijn
@@ -5,4 +5,7 @@
:import std/Number/Conversion .
# converts a char to a balanced ternary number
-number! [binary→ternary (0 - '0')] ⧗ Char → Number
+char→number [binary→ternary (0 - '0')] ⧗ Char → Number
+
+# converts a balanced ternary number to a char
+number→char ['0' + (ternary→binary 0)] ⧗ Number → Char