On https://gist.github.com/joskoot
you can find function (partition n k)
which returns the k-th partition of n.
Racket Users list:
http://lists.racket-lang.org/users
Thanks for your advice.
Source is now on https://gist.github.com/joskoot/c80cee6fadce3434e941
Jos
_
From: Laurent [mailto:laurent.ors...@gmail.com]
Sent: martes, 06 de mayo de 2014 21:56
To: Jos Koot
Cc: Racket mailing list
Subject: Re: [racket] partitions
Why not making it a package
gt; To Deeren
> I'll send you the code privately.
> As an example of the ordering:
> (stream->list (make-partitions-stream 5)) ->
>
>
> --
> *From:* Deren Dohoda [mailto:deren.doh...@gmail.com]
> *Sent:* martes, 06 de mayo de 2014 20
I'll send you the code privately.
As an example of the ordering:
(stream->list (make-partitions-stream 5)) ->
_
From: Deren Dohoda [mailto:deren.doh...@gmail.com]
Sent: martes, 06 de mayo de 2014 20:36
To: Jos Koot
Cc: Racket mailing list
Subject: Re: [racket] partitio
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 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
6 matches
Mail list logo