Hacker News new | ask | show | jobs
by elcritch 19 days ago
I like doing a mix of either in Nim depending on situation: for i in 0 ..< n: total += a[i]

Sometimes: for x in a: total += x

Sometimes even: foo.foldl(a + b)