All pastes #839293 Raw Edit

Miscellany

public ruby v1 · immutable
#839293 ·published 2007-12-30 23:18 UTC
rendered paste body
#!/usr/bin/rubyarray = [4,2,5,7,3,2,234,4356]new_array = []array.each_with_index do |current,x|  new_array << (current + array[x+1]) / 2 if array[x+1]endputs new_array.inspect