title: Using each_with_index with map
body: <p>I want to take a array and make it an order list. Currently I'm trying to do it in this way:</p>
  
  <pre><code>r = ["a", "b","c"]
  r.each_with_index { |w, index| puts "#{index+1}. #{w}" }.map.to_a
  # 1. a
  # 2. b
  # 3. c
  #=&gt; ["a", "b", "c"]
  </code></pre>
  
  <p>the output should be <code>["1. a", "2. b", "3. c"]</code>.</p>
  
  <p>How do I get the proper output to be the new value for the <code>r</code> array?</p>