3 ms·
Fun enough, a list[0] in Go is actually a doubly linked list. Resizable slices[1] are built into the language. Though, this leads to C style coding that some
by kyrra 13y ago
Fun enough, a list[0] in Go is actually a doubly linked list. Resizable slices[1] are built into the language. Though, this leads to C style coding that some people thing is annoying (assigning the result of append back to x, since it could allocate a new array).
x = append(x, a, b, c)
[0] http://golang.org/pkg/container/list/ http://golang.org/pkg/container/list/
[1] http://golang.org/pkg/builtin/#append http://golang.org/pkg/builtin/#append