Address _vec.grow FIXME, as issue #89 has been closed.

This commit is contained in:
Roy Frostig
2010-08-03 18:10:18 -07:00
parent d5fd81174e
commit 5796ebb1e7
+1 -4
View File
@@ -68,15 +68,12 @@ fn slice[T](vec[T] v, int start, int end) -> vec[T] {
ret result;
}
// Ought to take mutable &vec[T] v and just mutate it instead of copy
// and return. Blocking on issue #89 for this.
fn grow[T](mutable vec[T] v, int n, &T initval) -> vec[T] {
fn grow[T](&mutable vec[T] v, int n, &T initval) {
let int i = n;
while (i > 0) {
i -= 1;
v += vec(initval);
}
ret v;
}
fn map[T,U](&op[T,U] f, &vec[T] v) -> vec[U] {