-- $Id: sumcol.lua,v 1.2 2000/10/07 08:41:44 doug Exp $ -- http://www.bagley.org/~doug/shootout/ -- contributed by Roberto Ierusalimschy local sum = 0 for line in io.lines() do sum = sum + line end print(sum)