You can do solve the problem without the "lines" variable but, believe me, you want to keep those lines in a collection. It's gonna be a lot easier down the road!
Hint (to solve the problem) : look at what "lines" contain (instances of which class). That class has everything you need to parse those '+2' and '-8' ... ;)
| file |
lines := OrderedCollection new.
file := StandardFileStream readOnlyFileNamed: 'day.1.input'.
[file atEnd] whileFalse: [lines add: file nextLine].
file close.
-----------------
Beno��t St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero". (A. Einstein)