nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
phase: continue the phase if errors occur.
[nit.git]
/
lib
/
counter.nit
diff --git
a/lib/counter.nit
b/lib/counter.nit
index
6d5729d
..
befce9c
100644
(file)
--- a/
lib/counter.nit
+++ b/
lib/counter.nit
@@
-53,14
+53,14
@@
class Counter[E]
redef fun iterator do return map.iterator
# The number of counted occurrences of `e`
redef fun iterator do return map.iterator
# The number of counted occurrences of `e`
- redef fun [](e: E): Int
+ redef fun [](e)
do
var map = self.map
if map.has_key(e) then return map[e]
return 0
end
do
var map = self.map
if map.has_key(e) then return map[e]
return 0
end
- redef fun []=(e: E, value: Int)
+ redef fun []=(e, value)
do
sum -= self[e]
self.map[e] = value
do
sum -= self[e]
self.map[e] = value