From: Paul Lutus Date: 2006-12-02T18:35:09+09:00 Subject: Re: [OT] calculations on lists of numbers Joel VanderWerf wrote: > puts "#{sum} #{mean} #{array.min} #{array.max}" I'm not much into golf, but, since we've long since left the clubhouse, and because I am very lazy: puts [ sum,mean,array.min,array.max ].map { |v| v.to_s }.join(' ') This has the sole advantage that particular elements can be added and removed without a lot of typing. If no one expects to change the program, then there's no point in it. -- Paul Lutus http://www.arachnoid.com