From: "David A. Black" Date: 2004-12-05T09:05:13+09:00 Subject: Re: Ruby 2.0 Hi -- On Sun, 5 Dec 2004, Florian Gross wrote: > William James wrote: > > > Brian Mitchell wrote > > > >>32.times{|y|print" "*(31-y);(y+1).times{|x|print" #{~y&x==0?"A":"."}"};puts} > > > > Excellent signature, Brian. Here's a shortened version: > > > > 32.times{|y|print" "*(31-y);(y+1).times{|x|print~y&x>0?" .":" A"};puts} > > Yet shorter: > > 32.times{|y|print" "*(31-y),(0..y).map{|x|~y&x>0?" .":" A"},$/} Does this count as shorter? ruby -le'32.times{|y|print" "*(31-y),(0..y).map{|x|~y&x>0?" .":" A"}}' :-) David -- David A. Black dblack@wobblini.net