[plt-scheme] Comprehension: An example with five nested loops and four guards

From: Robby Findler (robby at cs.uchicago.edu)
Date: Mon Jun 4 14:53:06 EDT 2007

On 6/4/07, Jens Axel Søgaard <jensaxel at soegaard.net> wrote:
> David Einstein skrev:
> > Does this give the set with the lowest sum?
> Yes.

The code may in fact produce the one with the smallest sum, but it
looks like it would be wrong if there a set of primes that has a
higher sum, but a lower smallest prime (that is -- the code that just
is a constant list of the ones with the lowest sum would also be an
answer but it, just like the code posted, would not mirror the problem


Posted on the users mailing list.