ulid-0.3.2.0: Implementation of ULID - Universally Unique Lexicographically Sortable Identifier
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.ULID.Digits

Description

Synopsis

Documentation

digits Source #

Arguments

:: Integral n 
=> n

The base to use (typically 10).

-> n

The number to convert to digit form.

-> [n]

Either Nothing or the digits of the number in list form.

Returns the digits of a positive integer as a list. Throws an error if given a zero or negative base.

unDigits Source #

Arguments

:: Integral n 
=> n

The base to use.

-> [n]

The digits of the number in list form.

-> n

The original number.

Takes a list of digits, and converts them back into a positive integer.