benbjohnson / immutable

Immutable collections for Go
MIT License
713 stars 32 forks source link

SortedSetBuilder Doesn't Have a Mechanism To Return The Set #44

Closed d80tb7 closed 1 year ago

d80tb7 commented 1 year ago

As far as I can tell, SortedSetBuilder doesn't have a mechanism to allow the caller to retrieve the built Set. I propose adding a method, func(s SortedSetBuilder[T])()SortedSet[T] which is analogous to ListBuilder.List() and MapBuilder.Map() respectively.

Happy to make a PR for this if you think it's useful

BarrensZeppelin commented 1 year ago

This is definitely an oversight. Feel free to submit a PR. :slightly_smiling_face: