MCPcopy Create free account
hub / github.com/benbjohnson/immutable / Append

Method Append

immutable_test.go:302–307  ·  view source on GitHub ↗

Append adds v to the end of slice and List.

(v int)

Source from the content-addressed store, hash-verified

300
301// Append adds v to the end of slice and List.
302func (l *TList) Append(v int) {
303 l.prev = l.im
304 l.im = l.im.Append(v)
305 l.builder.Append(v)
306 l.std = append(l.std, v)
307}
308
309// Prepend adds v to the beginning of the slice and List.
310func (l *TList) Prepend(v int) {

Callers 14

TestListFunction · 0.95
BenchmarkList_AppendFunction · 0.45
BenchmarkList_SetFunction · 0.45
BenchmarkList_IteratorFunction · 0.45
BenchmarkListBuilder_SetFunction · 0.45
ExampleList_AppendFunction · 0.45
ExampleList_SetFunction · 0.45
ExampleList_SliceFunction · 0.45
ExampleList_IteratorFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected