()
| 520 | } |
| 521 | |
| 522 | func ExampleList_Prepend() { |
| 523 | l := NewList[string]() |
| 524 | l = l.Prepend("foo") |
| 525 | l = l.Prepend("bar") |
| 526 | l = l.Prepend("baz") |
| 527 | |
| 528 | fmt.Println(l.Get(0)) |
| 529 | fmt.Println(l.Get(1)) |
| 530 | fmt.Println(l.Get(2)) |
| 531 | // Output: |
| 532 | // baz |
| 533 | // bar |
| 534 | // foo |
| 535 | } |
| 536 | |
| 537 | func ExampleList_Set() { |
| 538 | l := NewList[string]() |