aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Ensure immutability of sets (and maps with SetMany)Oskar Haarklou Veileborg2023-01-094-30/+17
|
* Merge pull request #35 from laher/sets-maps-append-multiBen Johnson2023-01-025-21/+212
|\ | | | | Sets & maps append-multi. Also docs and a fix for SortedSets
| * set/sorted-set: Items() to return slice of itemsAm Laher2022-12-281-0/+22
| |
| * SortedMap: set multiple items at onceAm Laher2022-12-281-0/+23
| |
| * Fix SortedSet.Set. NewMapOf. docsAm Laher2022-12-284-3/+125
| |
| * sets: varargsAm Laher2022-12-282-18/+42
|/
* Merge pull request #34 from laher/setsBen Johnson2022-12-262-0/+272
|\ | | | | Set + SortedSet with tests
| * Set + SortedSet with testAm Laher2022-12-242-0/+272
| |
* | Merge pull request #33 from laher/addmultiBen Johnson2022-12-261-7/+19
|\ \ | |/ |/| List: varargs for Append,Prepend,NewList
| * List: varargs for Append,Prepend,NewListAm Laher2022-12-241-7/+19
|/
* Merge pull request #30 from laher/masterBen Johnson2022-12-211-18/+9
|\ | | | | readme updates for latest changes
| * readme updates for latest changesAm Laher2022-12-221-18/+9
|/
* Merge pull request #29 from laher/map-keys-comparableBen Johnson2022-12-201-47/+81
|\ | | | | generics: widen map key constraint to 'comparable'
| * generic-widening: improve docsAm Laher2022-12-041-6/+6
| |
| * generics: widen map key constraint to 'comparable'Am Laher2022-12-041-42/+76
|/
* Merge pull request #28 from BarrensZeppelin/masterBen Johnson2022-12-022-30/+65
|\ | | | | Allow lists to contain non-comparable elements
| * Allow lists to contain non-comparable elementsOskar Haarklou Veileborg2022-11-172-30/+65
|/ | | | | | | | | | | | | | | | | The current design uses comparability of elements only to detect vacant entries in leaf node children lists, using the zero value of the element type as "vacant". The reason we care about vacant entries is to avoid copy operations in certain Slice calls. If the entries are not vacant, we have to "zero" the entries in the returned slice to remove references to allocated memory. Therefore, (hackily) treating the zero value as vacant works because the zero value for pointers is nil (it does not reference anything). However, requiring the list elements to be comparable is inconvenient. There shouldn't be a type bound on the elements of a general purpose list. With this change vacancy is kept track of with a bitset in list leaf nodes.
* Merge pull request #24 from banks/patch-1Ben Johnson2022-10-061-12/+19
|\ | | | | Remove references to []byte keys in README
| * Remove references to []byte keys in READMEPaul Banks2022-10-051-12/+19
|/ | | | | | | #23 added generic support (which is awesome) but noted the breaking change about no longer supporting `[]byte` keys due to the `Ordered` constraint. Ideally, this library would continue to support `[]byte` keys and use a custom interface to constrain key types instead. But until that happens, the README right now is a bit surprising as it talks explicitly about supporting `[]byte` keys still but they are actually a compile error! Here's a drive-by fix for the README for now - I _think_ I caught all the incorrect statements.
* Merge pull request #23 from laher/masterBen Johnson2022-10-046-1094/+720
|\ | | | | Adds generics
| * revert fork-related readme contentAm Laher2022-06-111-17/+0
| |
| * add missing ptr types; tidyupAm Laher2022-06-112-69/+18
| |
| * undo v2 module change after comment from @benbjohnsonAmir Laher2022-05-201-1/+1
| |
| * upgrade github actions to go 1.18Amir Laher2022-05-201-2/+2
| |
| * Set module path as v2 (breaking change)Amir Laher2022-05-191-1/+1
| |
| * update readmeAmir Laher2022-05-192-20/+37
| |
| * implement generic immutable mapsAmir Laher2022-05-194-941/+610
| |
| * convert lists to use genericsAmir Laher2022-05-193-139/+147
|/
* Fix MapBuilder docsBen Johnson2021-06-011-1/+1
|
* Merge pull request #16 from benbjohnson/refactor-buildersBen Johnson2020-11-173-108/+107
|\ | | | | Refactor builders
| * Refactor buildersBen Johnson2020-11-173-108/+107
|/ | | | | | | This commit fixes a bug in builders that caused changes to leak when building on existing collections. The builders now only work on empty list & map types and are marked as invalid after the underlying collection has been retrieved from them.
* Merge pull request #15 from benbjohnson/tweak-actionsBen Johnson2020-09-232-2/+2
|\
| * GitHub Actions tweaksBen Johnson2020-09-232-2/+2
|/
* READMEBen Johnson2020-09-231-1/+1
| | | Updating badges
* Merge pull request #14 from benbjohnson/github-actionsBen Johnson2020-09-231-0/+29
|\ | | | | Add GitHub Actions support
| * Add GitHub Actions supportBen Johnson2020-09-231-0/+29
|/
* README Ben Johnson2020-09-231-12/+15
| | | Update docs to reflect new `Hasher` & `Comparer` types.
* Merge pull request #13 from benbjohnson/circleciBen Johnson2020-09-222-14/+1
|\ | | | | Remove CircleCI
| * Remove CircleCIBen Johnson2020-09-222-14/+1
|/
* Merge pull request #12 from benbjohnson/reflectBen Johnson2020-09-222-25/+526
|\ | | | | Add additional hashers & comparers.
| * Add additional hashers & comparers.Adrian2020-09-222-25/+526
|/ | | | | | | | This commit adds all int & uint type hashers & comparers. It also provides reflection-based hashers & comparers for int, uint, & string types that are wrapped with a different named type. Co-authored-by: Ben Johnson <benbjohnson@yahoo.com>
* Merge pull request #9 from benbjohnson/readmeBen Johnson2019-03-061-2/+2
|\ | | | | Change hasher & comparer implementations to unexported in README
| * READMEBen Johnson2019-03-061-2/+2
| | | | | | Change hasher & comparer implementations to unexported in README.
* | Merge pull request #8 from benbjohnson/list-builder-lenBen Johnson2019-03-062-1/+8
|\ \ | |/ |/| Add ListBuilder.Len()
| * Add ListBuilder.Len()Ben Johnson2019-03-062-1/+8
|/ | | | | | This commit adds a method to check the current length of a list on a `ListBuilder`. This allows the length to be checked without marking the next builder change as immutable.
* Merge pull request #7 from benbjohnson/sorted-map-builderBen Johnson2019-03-063-61/+280
|\ | | | | Add SortedMapBuilder
| * Add SortedMapBuilderBen Johnson2019-03-063-61/+280
|/ | | | This commit adds an efficient builder for creating SortedMap objects.
* Merge pull request #6 from benbjohnson/remove-cmpBen Johnson2019-03-063-8/+7
|\ | | | | Remove go-cmp dependency
| * Remove go-cmp dependencyBen Johnson2019-03-063-8/+7
|/
* Merge pull request #5 from benbjohnson/map-builderBen Johnson2019-03-063-116/+448
|\ | | | | Add MapBuilder