more work

This commit is contained in:
Nathan Braswell
2015-08-06 02:42:40 -04:00
parent dec9b7d0bd
commit 1f119af8ad
9 changed files with 284 additions and 21 deletions

View File

@@ -173,6 +173,12 @@ obj vector<T> (Object) {
size--
}
fun clear() {
for (var i = 0; i < size; i++;)
maybe_destruct(&data[i])
size = 0
}
fun for_each(func: fun(ref T):void):void {
for (var i = 0; i < size; i++;)
func(data[i])