10
edits
No edit summary |
m (v.vector(1) is wrong, vector is not a function of std.Vector, it is the like the name suggest of type vector and accessing elements is done with square brackets: v.vector[1]) |
||
Line 99: | Line 99: | ||
var v = std.Vector.new(['a', 'b', 'c']); | var v = std.Vector.new(['a', 'b', 'c']); | ||
var result = v.vector | var result = v.vector[1]; | ||
assert(result == "b"); | assert(result == "b"); | ||
</syntaxhighlight> | </syntaxhighlight> |
edits