Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Obsolute. TODO: Delete.
Documentation
mDigitsRev :: Integral n => n -> n -> Maybe [n] #
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.
mDigits :: Integral n => n -> n -> Maybe [n] #
Returns the digits of a positive integer as a Maybe list. or Nothing if a zero or negative base is given
digitsRev :: Integral n => n -> n -> [n] #
Returns the digits of a positive integer as a list, in reverse order. Throws an error if given a zero or negative base.
digits :: Integral n => n -> n -> [n] #
Returns the digits of a positive integer as a list. REMARK: It's modified to return `[0]` when given zero.
unDigits :: Integral n => n -> [n] -> n #
Takes a list of digits, and converts them back into a positive integer.
convertBase :: Integral a => a -> a -> [a] -> [a] #
https://stackoverflow.com/questions/10028213/converting-number-base REMARK: It returns `[]` when given `[0]`. Be sure to convert `[]` to `[0]` if necessary.