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

Function ExampleList_Slice

immutable_test.go:550–562  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

548}
549
550func ExampleList_Slice() {
551 l := NewList[string]()
552 l = l.Append("foo")
553 l = l.Append("bar")
554 l = l.Append("baz")
555 l = l.Slice(1, 3)
556
557 fmt.Println(l.Get(0))
558 fmt.Println(l.Get(1))
559 // Output:
560 // bar
561 // baz
562}
563
564func ExampleList_Iterator() {
565 l := NewList[string]()

Callers

nothing calls this directly

Calls 3

AppendMethod · 0.45
SliceMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…