<!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><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014>Hi Phil, Deren and Jensaxel,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014>Thanks for your quick responses.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014>To Phil:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014>I have read your code, but it is not 
lazy.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014>I think that for large n memory is going to be a 
problem.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014>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 size=2 face="Courier New"><SPAN 
class=687493918-06052014>Thanks anyway.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014>To Deeren</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014>I'll send you the code privately.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014>As an example of the ordering:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014>(stream->list (make-partitions-stream 5)) 
-></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face="Courier New"><SPAN 
class=687493918-06052014></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 class=OutlookMessageHeader dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> Deren Dohoda 
  [mailto:deren.dohoda@gmail.com] <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>
  <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></BLOCKQUOTE></BODY></HTML>