X-Git-Url: http://nitlanguage.org diff --git a/lib/counter.nit b/lib/counter.nit index ceb9896..e539bc5 100644 --- a/lib/counter.nit +++ b/lib/counter.nit @@ -80,6 +80,12 @@ class Counter[E] map.clear end + redef fun add_all(other) do + for k, v in other do + self[k] += v + end + end + # Count one more occurrence of `e` fun inc(e: E) do