<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.16661"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=528393220-06052014><FONT color=#0000ff
size=2 face="Courier New">Thanks for your advice.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=528393220-06052014><FONT color=#0000ff
size=2 face="Courier New">Source is now on <A
href="https://gist.github.com/joskoot/c80cee6fadce3434e941">https://gist.github.com/joskoot/c80cee6fadce3434e941</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=528393220-06052014><FONT color=#0000ff
size=2 face="Courier New">Jos</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV lang=en-us class=OutlookMessageHeader dir=ltr align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Laurent
[mailto:laurent.orseau@gmail.com] <BR><B>Sent:</B> martes, 06 de mayo de 2014
21:56<BR><B>To:</B> Jos Koot<BR><B>Cc:</B> Racket mailing
list<BR><B>Subject:</B> Re: [racket] partitions<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>
<DIV>Why not making it a package? Or at least share it on pasterack [1] or
gist [2]?<BR></DIV>
<DIV>I'm sure other people will be happy to find it in the future.<BR></DIV>
<DIV><BR></DIV>Laurent<BR>
<DIV><BR>[1] <A href="http://pasterack.org/">http://pasterack.org/</A><BR>[2]
<A href="http://gist.github.com">gist.github.com</A><BR></DIV></DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>On Tue, May 6, 2014 at 8:52 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="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><U></U>
<DIV>
<DIV dir=ltr align=left><FONT color=#0000ff face="Courier New"><SPAN>Hi
Phil, Deren and Jensaxel,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff face="Courier New"><SPAN>Thanks
for your quick responses.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff
face="Courier New"><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff face="Courier New"><SPAN>To
Phil:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff face="Courier New"><SPAN>I have
read your code, but it is not lazy.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff face="Courier New"><SPAN>I think
that for large n memory is going to be a problem.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff face="Courier New"><SPAN>Your
eager approach resembles much my lazy code, but I produce the partitions in
reverse order.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff face="Courier New"><SPAN>Thanks
anyway.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff
face="Courier New"><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff face="Courier New"><SPAN>To
Deeren</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff face="Courier New"><SPAN>I'll
send you the code privately.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff face="Courier New"><SPAN>As an
example of the ordering:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff
face="Courier New"><SPAN>(stream->list (make-partitions-stream 5))
-></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff
face="Courier New"><SPAN></SPAN></FONT> </DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma><B>From:</B> Deren Dohoda [mailto:<A
href="mailto:deren.dohoda@gmail.com"
target=_blank>deren.dohoda@gmail.com</A>] <BR><B>Sent:</B> martes, 06 de
mayo de 2014 20:36<BR><B>To:</B> Jos Koot<BR><B>Cc:</B> Racket mailing
list<BR><B>Subject:</B> Re: [racket] partitions<BR></FONT><BR></DIV>
<DIV>
<DIV class=h5>
<DIV></DIV>
<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="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">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></DIV></DIV></BLOCKQUOTE></DIV><BR>____________________<BR>
Racket Users list:<BR> <A href="http://lists.racket-lang.org/users"
target=_blank>http://lists.racket-lang.org/users</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></BODY></HTML>