Non-decimal radices/Convert: Difference between revisions
m
→{{header|Haskell}}
(→{{header|Haskell}}: Deriving toBase :: Int -> Int -> String from inBaseDigits :: [Char] -> Int -> String) |
|||
Line 1,227:
Using built-in functions to convert integer into string, and vice versa, at any base up to 16:
<lang haskell>import Data.List (unfoldr)
Line 1,280 ⟶ 1,237:
else []
inBaseDigits ::
inBaseDigits ds n =
let base = length ds
Line 1,314 ⟶ 1,271:
11111110
376
fe
11111110</pre>
=={{header|HicEst}}==
|