()
| 643 | } |
| 644 | |
| 645 | func ExampleListBuilder_Slice() { |
| 646 | b := NewListBuilder[string]() |
| 647 | b.Append("foo") |
| 648 | b.Append("bar") |
| 649 | b.Append("baz") |
| 650 | b.Slice(1, 3) |
| 651 | |
| 652 | l := b.List() |
| 653 | fmt.Println(l.Get(0)) |
| 654 | fmt.Println(l.Get(1)) |
| 655 | // Output: |
| 656 | // bar |
| 657 | // baz |
| 658 | } |
| 659 | |
| 660 | // Ensure node can support overwrites as it expands. |
| 661 | func TestInternal_mapNode_Overwrite(t *testing.T) { |