Skip to main content

File_By_Line.each_with_index

each_with_indexfunction

Documentation

Performs an action on each line.

The function is called with both the element index as well as the element itself.

Arguments

  • function: A function to apply that takes an index and an item.