1 msgBad file descriptor - connect(2) (Errno::EBADF)
1 msg[ANN] RubyKaigi2008 Tickets and News
2 msgin `include': wrong argument type Class ???
7 msgverify installation
34 msg[QUIZ] The Turing Machine (#162)
10 msgWhich GUI library to use?
1 msgForm_remote_tag and csv download?
3 msgDownload resume with NET::HTTP

Delete every other value in an array
\ Tim Conner (9 May 2008)
. \ Harry Kakueki (9 May 2008)
. . \ Harry Kakueki (10 May 2008)
. . . \ Harry Kakueki (11 May 2008)
. \ yermej (9 May 2008)
. . \ ara.t.howard (9 May 2008)
. \ Raúl GutiérrezS. (9 May 2008)
. . \ ara.t.howard (9 May 2008)
. \ James Gray (9 May 2008)
. \ ara.t.howard (9 May 2008)
. \ Robert Dober (9 May 2008)
. . \ Robert Dober (9 May 2008)
. \ Joel VanderWerf (10 May 2008)
. \ yermej (10 May 2008)
. \ 7stud -- (10 May 2008)
. . \ David A. Black (10 May 2008)
. . . \ 7stud -- (10 May 2008)
. \ S2 (10 May 2008)

1 msgrunning a script through remote desktop
4 msgUsing Derrick Pallas' ruby fcgi dispatcher
2 msgActive Record: Query to find all the tables in ...
3 msgvalidation for file
3 msgRe: Bootstrapping Ruby with MinGW: selfhosted a...
1 msgRe: Bootstrapping Ruby with MinGW: selfhosted a...
3 msghow to do this regex substitution?
1 msgHI.How to install instal qtruby4-1.4.9-mswin32....
5 msgHow to re-replace Hash default value behaviour?
5 msgPrinciple of le,err i mean biggest surprise!!??
1 msgRMagick 1.15.14
Subject:Delete every other value in an array
Group:Ruby-talk
From:Tim Conner
Date:9 May 2008


 
What is the best way to delete every other value in a ruby array?
e.g.
%w(a b c d e f g h i j k)

becomes => [a c e g i k]

thanks
--
Posted via http://www.ruby-forum.com/.



© 2004-2008 readlist.com