nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a_star: don't crash on deserialization errors and limit static types
[nit.git]
/
lib
/
counter.nit
diff --git
a/lib/counter.nit
b/lib/counter.nit
index
ceb9896
..
e539bc5
100644
(file)
--- a/
lib/counter.nit
+++ b/
lib/counter.nit
@@
-80,6
+80,12
@@
class Counter[E]
map.clear
end
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
# Count one more occurrence of `e`
fun inc(e: E)
do