# File lib/active_support/core_ext/enumerable.rb, line 92
  def index_by
    Hash[map { |elem| [yield(elem), elem] }]
  end