query
On this page

toBaseDigits

lib.toBaseDigits

Docs pulled from | This Revision | 21 minutes ago


toBaseDigits base i converts the positive integer i to a list of its digits in the given base. For example:

toBaseDigits 10 123 => [ 1 2 3 ]

toBaseDigits 2 6 => [ 1 1 0 ]

toBaseDigits 16 250 => [ 15 10 ]

Inputs

base

1. Function argument

i

2. Function argument

(lib.trivial.toBaseDigits)

Noogle also knows

Aliases