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

Method Set

immutable_test.go:318–323  ·  view source on GitHub ↗

Set updates the value at index i to v in the slice and List.

(i, v int)

Source from the content-addressed store, hash-verified

316
317// Set updates the value at index i to v in the slice and List.
318func (l *TList) Set(i, v int) {
319 l.prev = l.im
320 l.im = l.im.Set(i, v)
321 l.builder.Set(i, v)
322 l.std[i] = v
323}
324
325// Slice contracts the slice and List to the range of start/end indices.
326func (l *TList) Slice(start, end int) {

Callers 1

TestListFunction · 0.95

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected