Proposal for a generic showIntAtBase
Henning Thielemann
lemming at henning-thielemann.de
Mon Apr 6 10:35:29 UTC 2015
On Sun, 5 Apr 2015, Vikas Menon wrote:
> Example:
> λ> showIntAtBaseGeneric 26 id (:) 500 [] -- convert 500 to base26 and provide output as a list.
> [19,6]
>
> Please let me know thoughts/concerns if any to this proposal.
That is, you want to decompose a number into digits of an arbitrary base?
I would not associate that with "show". I have implemented this in some
flavors:
https://hackage.haskell.org/package/numeric-prelude-0.4.2/docs/Algebra-IntegralDomain.html#v:decomposeVarPositional
decomposePositional in
http://code.haskell.org/~thielema/htam/src/NumberTheory.hs
More information about the Libraries
mailing list