Add some support for using a map like a set.

This commit is contained in:
Michael Sullivan 2011-07-21 18:14:39 -07:00
parent cb02425376
commit 4b59ae0aa9
2 changed files with 20 additions and 2 deletions

View file

@ -105,6 +105,11 @@ fn new_smallintmap_adapter[K, V](fn(&K) -> uint key_idx,
idx += 1u;
}
}
iter keys() -> K {
for each (@tup(K, V) p in self.items()) {
put p._0;
}
}
}
auto map = smallintmap::mk[V]();