From: Daniel Baird Date: 2006-08-02T16:53:52+09:00 Subject: Re: golfing Eratosthenes On 8/2/06, Daniel Baird wrote: > Hi all, > > I've been golfing around with the sieve of Eratosthenes. Here's what > I've got so far: > > a=(2..100).to_a;p a.each{|c|a.map!{|d|c&&d&&c > It's already under 80 chars, but I'd still love to remove the > definition of the array a, and do the whole thing with no semicolons. > Any suggestions? > Improvement: a=(2..100).to_a;p a.each{|c|a.reject!{|d|c