<div dir="ltr">Decomposing numbers into arbitrary bases *already* exists as showIntAtBase. Vikas's proposal is about generalizing this existing function to output more than just strings and characters. Whether the existing naming scheme makes sense is a separate issue. (The whole Numeric module is weird, from the non-hierarchical name through function like showFFloatAlt.)</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 6, 2015 at 3:35 AM, Henning Thielemann <span dir="ltr"><<a href="mailto:lemming@henning-thielemann.de" target="_blank">lemming@henning-thielemann.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On Sun, 5 Apr 2015, Vikas Menon wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Example: <br>
λ> showIntAtBaseGeneric 26 id (:) 500 [] -- convert 500 to base26 and provide output as a list.<br>
[19,6]<br>
<br>
Please let me know thoughts/concerns if any to this proposal.<br>
</blockquote>
<br></span>
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:<br>
<a href="https://hackage.haskell.org/package/numeric-prelude-0.4.2/docs/Algebra-IntegralDomain.html#v:decomposeVarPositional" target="_blank">https://hackage.haskell.org/<u></u>package/numeric-prelude-0.4.2/<u></u>docs/Algebra-IntegralDomain.<u></u>html#v:decomposeVarPositional</a><br>
decomposePositional in<br>
<a href="http://code.haskell.org/~thielema/htam/src/NumberTheory.hs" target="_blank">http://code.haskell.org/~<u></u>thielema/htam/src/<u></u>NumberTheory.hs</a><br>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>