module Enumerable

def map_with_index &block

def map_with_index &block
  vals = []
  each_with_index { |v, i| vals << yield(v, i) } 
  vals
end