From: Robert Klemme Date: 2013-04-15T17:11:10+09:00 Subject: Re: simple lambda question --047d7b6219fe88d26f04da61cb8f Content-Type: text/plain; charset=ISO-8859-1 On Mon, Apr 15, 2013 at 6:29 AM, Lee Daekeun wrote: > Like this? > > 100.times.select{|a| a*a>1000}.map{|a| [a, (a*a).to_s]}.select{|a| > a[1][0]==a[1][1] and a[1][2]==a[1][3]} > Or irb(main):007:0> 100.times {|a| s = (a * a).to_s; puts a, s if /\A(\d)\1(\d)\2/ =~ s} 88 7744 => 100 Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ --047d7b6219fe88d26f04da61cb8f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

--047d7b6219fe88d26f04da61cb8f--