Liking cljdoc? Tell your friends :D

fooheads.numeral


digitclj/s

(digit n)

Returns a digit (0-9, A-Z) for a value. Max base is 36. Returns nil for values outside of range.

Returns a digit (0-9, A-Z) for a value. Max base is 36. Returns nil for
values outside of range.
raw docstring

digit-stringclj/s

(digit-string n)
(digit-string n base)
(digit-string n base min-digits)
(digit-string n base min-digits digit-fn)

Returns a string with the digits for n by calling digits and doing a clojure.string/join on the resulting digits. See digits for more details about the arguments.

Returns a string with the digits for n by calling `digits` and doing a
clojure.string/join on the resulting digits. See `digits` for more details about
the arguments.
raw docstring

digit-valueclj/s

(digit-value digit)

Returns the value for a digit (0-9, A-Z). Max base is 36. Returns nil for values outside of range.

Returns the value for a digit (0-9, A-Z). Max base is 36. Returns nil for
values outside of range.
raw docstring

digitsclj/s

(digits n)
(digits n base)
(digits n base min-digits)
(digits n base min-digits digit-fn)

Returns a seq of digits for a (positive) decimal int. Arguments are:

n - the decimal representation of the digit, for example 0 for \0, 16 for \F

base - the numeric base, defaults to 10.

min-digits - the minimum number of digits needed, defaults to 1.

digit-fn - a function that takes an int and returns a digit. The default implementation is the digit function in this namespace. If you have the need for other digits, you can provide your own function, which doesn not have to returns chars. If you provide the identity function, you will get back the numerical value for each digit.

Returns a seq of digits for a (positive) decimal int. Arguments are:

n - the decimal representation of the digit, for example
    0 for \0, 16 for \F

base - the numeric base, defaults to 10.

min-digits - the minimum number of digits needed, defaults to 1.

digit-fn - a function that takes an int and returns a digit. The default
           implementation is the `digit` function in this namespace.
           If you have the need for other digits, you can provide your own
           function, which doesn not have to returns chars. If you provide
           the identity function, you will get back the numerical value for
           each digit.
raw docstring

valueclj/s

(value digits)
(value digits base)
(value digits base digit-value-fn)

Returns the value for a string or seq of digits. base defaults to 10 and digit-value-fn defaults to digit-value

Returns the value for a string or seq of digits.
base defaults to 10 and digit-value-fn defaults to `digit-value`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close