()
| 613 | } |
| 614 | |
| 615 | func ExampleListBuilder_Prepend() { |
| 616 | b := NewListBuilder[string]() |
| 617 | b.Prepend("foo") |
| 618 | b.Prepend("bar") |
| 619 | b.Prepend("baz") |
| 620 | |
| 621 | l := b.List() |
| 622 | fmt.Println(l.Get(0)) |
| 623 | fmt.Println(l.Get(1)) |
| 624 | fmt.Println(l.Get(2)) |
| 625 | // Output: |
| 626 | // baz |
| 627 | // bar |
| 628 | // foo |
| 629 | } |
| 630 | |
| 631 | func ExampleListBuilder_Set() { |
| 632 | b := NewListBuilder[string]() |