[racket] partitions
Hi Jos,
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?
Deren
On Tue, May 6, 2014 at 2:26 PM, Jos Koot <jos.koot at gmail.com> wrote:
> Hi
>
> Library *math/number-theory* provides procedure *partitions*,
> which fastly tells you how many partitions a given nonnegative integer has
> (based on http://en.wikipedia.org/wiki/Partition_(number_theory))
>
> I have not found any procedure that generates the partitions themselves,
> nor in PLT Racket nor in Planet.
>
> Therefore I made my own code for procedures that
> produce (lazy) streams and sequences of partitions
> (make-partition-stream n) and (in-partitions n).
>
> If you are interested, let me know and I'll send you the code.
> It is too long to include it in this mail
> (77 lines of docs, 31 lines of code and 160 lines of tests)
>
> I would be happy with some feedback on my code.
> Or even happier with a pointer to already existing code.
>
> Best whishes, Jos
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140506/2a725b21/attachment.html>