()
| 597 | } |
| 598 | |
| 599 | func ExampleListBuilder_Append() { |
| 600 | b := NewListBuilder[string]() |
| 601 | b.Append("foo") |
| 602 | b.Append("bar") |
| 603 | b.Append("baz") |
| 604 | |
| 605 | l := b.List() |
| 606 | fmt.Println(l.Get(0)) |
| 607 | fmt.Println(l.Get(1)) |
| 608 | fmt.Println(l.Get(2)) |
| 609 | // Output: |
| 610 | // foo |
| 611 | // bar |
| 612 | // baz |
| 613 | } |
| 614 | |
| 615 | func ExampleListBuilder_Prepend() { |
| 616 | b := NewListBuilder[string]() |