Method: Array#map_with_index

Defined in:
lib/ludy/array/map_with_index.rb

#map_with_indexObject

just like each_with_index



4
5
6
7
# File 'lib/ludy/array/map_with_index.rb', line 4

def map_with_index
  i = -1
  map{ |e| i+=1; yield e, i; }
end