# MIT License, Copyright (c) 2024 Marvin Borner # convert bases to other bases :import std/Number/Unary U :import std/Number/Ternary T # converts unary numbers to ternary unary-to-ternary [0 T.inc (+0)] ⧗ Unary → Ternary :test (unary-to-ternary (+0u)) ((+0)) :test (unary-to-ternary (+2u)) ((+2)) # converts ternary numbers to unary ternary-to-unary [T.apply 0 U.inc (+0u)] ⧗ Ternary → Unary :test (ternary-to-unary (+0)) ((+0u)) :test (ternary-to-unary (+2)) ((+2u))