mapLinesIndexed

performs transform on each line

Doesn't preserve the original line endings.