Variadic append

This commit is contained in:
Ginger Bill
2017-01-29 20:48:08 +00:00
parent 984e36a151
commit 43be91bca3
5 changed files with 105 additions and 44 deletions

View File

@@ -14,12 +14,7 @@ main :: proc() {
defer free(array);
reserve(^array, 10);
append(^array, 2);
append(^array, 3);
append(^array, 5);
append(^array, 7);
append(^array, 11);
append(^array, 13);
append(^array, 2, 3, 5, 7, 11, 13);
for val, idx in array {
fmt.println(val, idx);
}