<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace">Hi Jos,<br><br>Actually I'd love to have you share it. I did write myself a partition generator but it was eager and I never went back to make it into a sequence or stream, though I'm sure it was somewhere in my to-do list. How are they ordered?<br>
<br>Deren<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 6, 2014 at 2:26 PM, Jos Koot <span dir="ltr"><<a href="mailto:jos.koot@gmail.com" target="_blank">jos.koot@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
Library *math/number-theory* provides procedure *partitions*,<br>
which fastly tells you how many partitions a given nonnegative integer has<br>
(based on <a href="http://en.wikipedia.org/wiki/Partition_(number_theory)" target="_blank">http://en.wikipedia.org/wiki/Partition_(number_theory)</a>)<br>
<br>
I have not found any procedure that generates the partitions themselves,<br>
nor in PLT Racket nor in Planet.<br>
<br>
Therefore I made my own code for procedures that<br>
produce (lazy) streams and sequences of partitions<br>
(make-partition-stream n) and (in-partitions n).<br>
<br>
If you are interested, let me know and I'll send you the code.<br>
It is too long to include it in this mail<br>
(77 lines of docs, 31 lines of code and 160 lines of tests)<br>
<br>
I would be happy with some feedback on my code.<br>
Or even happier with a pointer to already existing code.<br>
<br>
Best whishes, Jos<br>
<br>
____________________<br>
  Racket Users list:<br>
  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</blockquote></div><br></div>