Could someone please make the OP's example: # Code used to parse CSV file import std/strutils import std/sequtils let csv = readFile("./nim.csv") proc sum(s: seq[int]): int = s.foldl(a + b) var totalSum = 0 for l in csv.splitLines(): if l.len > 1: let rowSum = l.split(",").mapIt(it.parseInt).sum() totalSum += rowSum echo "Expected total = ", 2999999 * 3000000 / 2 echo "Actual total = ", totalSum Run
... in the `View types / lent / COW strings / ...` magic way everyone has started talking about? I for one don't know what exactly you are discussing and would be genuinely greatful if someone could provide an example, thanks.