D
Damphyr
we have [1,2,3,4,5,6,7] and want [2,4,6]
Is there a way other than
fields=[1,2,3,4,5,6,7]
fields.collect!{|f|
f if fields.index(f)%2==1
}.compact!
And by another way I mean something shorter and more beautiful .
Cheers,
V.-
--
http://www.braveworld.net/riva
____________________________________________________________________
http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
http://www.freemail.gr - free email service for the Greek-speaking.
Is there a way other than
fields=[1,2,3,4,5,6,7]
fields.collect!{|f|
f if fields.index(f)%2==1
}.compact!
And by another way I mean something shorter and more beautiful .
Cheers,
V.-
--
http://www.braveworld.net/riva
____________________________________________________________________
http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
http://www.freemail.gr - free email service for the Greek-speaking.