counter :: Counter :: sum=
var c = new Counter[String] assert c.sum == 0 c.inc_all(["a", "a", "b", "b", "b", "c"]) assert c.sum == 6
# Total number of counted occurrences # # ~~~ # var c = new Counter[String] # assert c.sum == 0 # c.inc_all(["a", "a", "b", "b", "b", "c"]) # assert c.sum == 6 # ~~~ var sum: Int = 0