On Fri, Apr 22, 2011 at 2:45 AM, Jose Calderon-Celis
<josecalderoncelis / gmail.com> wrote:

> for j in 1..len do
> =A0mycommand +=3D s[-1*j]
>
>

very nice I like the use of your math. By multiplying the array index
by negative one your sending the index a reverse number while your for
loop traverses forward. This is perfect logic.

Here is a rewrite with my while loop:

s =3D "1234567890"
r=3DString.new
i =3D 1
while i <=3D s.length
  r << s[i*(-1)]
  i+=3D1
end
printf s
"0987654321"
 =3D> "0987654321"
> y =3D=3D x.reverse
true