Commit Graph

25 Commits

Author SHA1 Message Date
Samuel Berthe
3bc887c57c doc: adding go playground examples 2025-09-23 14:54:30 +02:00
Oganes Mirzoyan
4a43ff68b4 Add ElementsMatch, ElementsMatchBy (#589)
* Add ElementsMatch, ElementsMatchBy

* Update intersect.go

* Update README.md

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-04-26 19:06:51 +02:00
Samuel Berthe
33f7b14d1d Merge branch 'master' into nick-add-without-by 2025-01-25 23:40:21 +01:00
Samuel Berthe
8e64522eb6 feat: adding WithoutNth (#575) 2025-01-25 18:18:48 +01:00
SnowOnion
9c6999edf6 docs: clarify Empty returns zero value (#543)
* docs: clarify `Empty` returns zero value

https://go.dev/ref/spec#The_zero_value does not define "empty value". It informally mentions "empty value", meaning (non-nil && 0-length) slice or map.

> Note that the zero value for a slice or map type is not the same as an initialized but empty value of the same type.

* docs: other "empty value" -> "zero value"

---------

Co-authored-by: xuanhong <litianchi@papegames.net>
2025-01-24 22:10:28 +01:00
nicklausliu
c102c03738 feat: replace Without implementation by WithoutBy 2024-08-23 11:32:04 +08:00
nicklausliu
6e5a845f9f feat: impove WithoutBy performance 2024-08-23 11:20:46 +08:00
Nathan Baulch
db0f4d2171 Tidy up (#519) 2024-08-22 01:17:02 +02:00
nicklausliu
3cf2fc4ba8 feat: modify WithoutBy function comment 2024-08-17 20:14:12 +08:00
nicklausliu
107d5794c3 feat: add WithoutBy 2024-08-15 11:52:22 +08:00
Samuel Berthe
3ba93a16cc feat: preserve type alias of slices and maps (see #365) 2024-06-30 00:04:08 +02:00
Milo
7cce15b3d5 perf: Optimize the performance of union method, avoid repeated expansion (#397)
Co-authored-by: 逍遥 <caowenbo@shizhuang-inc.com>
2024-06-28 19:24:57 +02:00
Samuel Berthe
61209816d1 feat: speed up loops by reducing allocations (#475) 2024-06-28 01:35:57 +02:00
guanming
a966a64cc6 Refactor Contains function to improve performance by using index iteration over collection (#428)
Co-authored-by: 关明 <guanming@ziipin.com>
2024-06-28 01:04:51 +02:00
H
6a2a333ded feat: improve Union (#245)
Co-authored-by: hhu <hhu@tencent.com>
2022-10-14 17:55:11 +02:00
Samuel Berthe
7887963db8 feat: name each callback/iteratee/predicate arguments in order to improve autocompletion
closes #242
2022-10-13 22:25:33 +02:00
Samuel Berthe
198c67fbf8 feat: adding WithoutEmpty 2022-07-04 10:20:52 +02:00
chensy
07fddc1640 Add function Without which return slice with slice all elements not i… (#142)
* Add function Without which return slice with slice all elements not in another

* feat(Without): inverse args and use variadic argment for excluding items

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2022-07-04 10:17:03 +02:00
CorentinClabaut
86d419c07f PR Update 2022-04-28 15:24:55 +02:00
CorentinClabaut
a043a269c0 Merge branch 'master' into AllAnyNone 2022-04-12 09:00:01 +02:00
xuzhiwei
2587bfdac0 Add Union 2022-03-10 14:48:41 +08:00
Xan
2491b05d09 update:intersect containsby utest 2022-03-08 15:52:40 +08:00
Xan
0cfa22a9fe add:intersect containsby 2022-03-08 15:22:00 +08:00
HirbodBehnam
1def922659 Use struct{} for sets 2022-03-05 22:00:44 +03:30
Samuel Berthe
74b7c77702 Initial commit 2022-03-02 13:52:01 +01:00