Ruby - Enumerable - each_with_index

  • Asked to answer
    + 1 comment

    Interesting, I hadn't seen map.with_index before. I would probably use .drop instead of generating nils and using .compact.