1 2 3 4 |
arr = (1..100).to_a
3.times do
arr = arr[0..((arr.length+1)/2)]
end
|
Pastie
Support Pastie
or read my
Pastie << self
blog
1 2 3 4 |
arr = (1..100).to_a
3.times do
arr = arr[0..((arr.length+1)/2)]
end
|