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

Method Slice

immutable_test.go:326–331  ·  view source on GitHub ↗

Slice contracts the slice and List to the range of start/end indices.

(start, end int)

Source from the content-addressed store, hash-verified

324
325// Slice contracts the slice and List to the range of start/end indices.
326func (l *TList) Slice(start, end int) {
327 l.prev = l.im
328 l.im = l.im.Slice(start, end)
329 l.builder.Slice(start, end)
330 l.std = l.std[start:end]
331}
332
333// Validate returns an error if the slice and List are different.
334func (l *TList) Validate() error {

Callers 3

TestListFunction · 0.95
ExampleList_SliceFunction · 0.45
ExampleListBuilder_SliceFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected