base encode

From The K Language Wiki
Revision as of 15:46, 26 July 2021 by Razetime (talk | contribs) (add encode page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Base encode
x/y

Base encode or just encode takes a digit array y and encodes it into a single number using the bases in x.

If x is an atom, repeats it for all elements in y.

 2 2 2/1 0 1
5
 2/1 0 1
5
 10 10 10/3 4 5
345