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

Function ExampleList_Set

immutable_test.go:537–548  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

535}
536
537func ExampleList_Set() {
538 l := NewList[string]()
539 l = l.Append("foo")
540 l = l.Append("bar")
541 l = l.Set(1, "baz")
542
543 fmt.Println(l.Get(0))
544 fmt.Println(l.Get(1))
545 // Output:
546 // foo
547 // baz
548}
549
550func ExampleList_Slice() {
551 l := NewList[string]()

Callers

nothing calls this directly

Calls 3

AppendMethod · 0.45
SetMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…