diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2020-11-17 12:37:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 12:37:28 -0700 |
commit | 065fdb4714e38b804e9b5998c88e6c921b12b966 (patch) | |
tree | b3752b8058b134797169a5d037eb4de3c8af45fb /README.md | |
parent | Merge pull request #15 from benbjohnson/tweak-actions (diff) | |
parent | Refactor builders (diff) | |
download | pds-065fdb4714e38b804e9b5998c88e6c921b12b966.tar.gz pds-065fdb4714e38b804e9b5998c88e6c921b12b966.tar.xz |
Merge pull request #16 from benbjohnson/refactor-builders
Refactor builders
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -115,7 +115,7 @@ a list in-place until you are ready to use it. This can improve bulk list building by 10x or more. ```go -b := immutable.NewListBuilder(immutable.NewList()) +b := immutable.NewListBuilder() b.Append("foo") b.Append("bar") b.Set(2, "baz") @@ -125,8 +125,7 @@ fmt.Println(l.Get(0)) // "foo" fmt.Println(l.Get(1)) // "baz" ``` -Lists are safe to use even after you continue to use the builder. It is also -safe to build on top of existing lists. +Builders are invalid after the call to `List()`. ## Map @@ -230,8 +229,7 @@ fmt.Println(m.Get("foo")) // "300" fmt.Println(m.Get("bar")) // "200" ``` -Maps are safe to use even after you continue to use the builder. You can -also build on top of existing maps too. +Builders are invalid after the call to `Map()`. ### Implementing a custom Hasher |