Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
:: Integral n | |
=> n | The base to use. |
-> n | The number to convert to digit form. |
-> Maybe [n] | Nothing or Just the digits of the number in list form |
Returns the digits of a positive integer as a Maybe list. or Nothing if a zero or negative base is given
:: 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.
:: Integral n | |
=> n | The base to use. |
-> n | The number to convert to digit form. |
-> Maybe [n] | Nothing or Just the digits of the number in list form, in reverse. |
Returns the digits of a positive integer as a Maybe list, in reverse order or Nothing if a zero or negative base is given This is slightly more efficient than in forward order.
:: Integral n | |
=> n | The base to use. |
-> n | The number to convert to digit from. |
-> [n] | The digits of the number in list from, in reverse. |
Returns the digits of a positive integer as a list, in reverse order. Throws an error if given a zero or negative base.
:: 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.