Line by line processing rather than aggregates

Hi,

as per answer 1. in issue #1, how would you plan to proceed if you were to update the code to perform line by line processing of input lines?

What I mean is having a 1-1 mapping of input and output lines, where each output line contains the sum and product of the corresponding input line:

input line 'X':  7 11
output line 'X': 18 77

If your time allows, please also proceed with the actual code update.