reed@google.com | dff7e11 | 2013-05-15 19:34:20 +0000 | [diff] [blame] | 1 | canvas = {} |
2 | total = 0 | ||||
3 | function accumulate(verb) | ||||
4 | total = total + 1 | ||||
5 | n = canvas[verb] or 0 | ||||
6 | n = n + 1 | ||||
7 | canvas[verb] = n | ||||
8 | end | ||||
9 | function summarize() | ||||
10 | io.write('total='..total..' ') | ||||
11 | for k, v in next, canvas do | ||||
12 | io.write(k..'='..v..' ') | ||||
13 | end | ||||
14 | end | ||||
15 |