Commit Graph

44 Commits

Author SHA1 Message Date
Owen Gong
52e17faeec Added DropByIndex helper for slice (#398)
* added DropByIndex helper

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2024-06-30 00:38:34 +02:00
Samuel Berthe
3ba93a16cc feat: preserve type alias of slices and maps (see #365) 2024-06-30 00:04:08 +02:00
Felipe Gasper
de419c7571 Make Filter() preserve type. (#365)
* Update slice.go

* add test
2024-06-29 23:33:19 +02:00
Samuel Berthe
2ec43f41f4 Revert "Add new method Concat (#376)" (#479)
This reverts commit 940ded8b03.
2024-06-29 22:41:09 +02:00
Jason Zhang
940ded8b03 Add new method Concat (#376)
* Add new method Concat

---------

Co-authored-by: Zhang Jie (Jason) <jie.zhang@grabtaxi.com>
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2024-06-29 21:53:58 +02:00
wick
fe16ff7d23 Add slice Splice an element or multiple elements at index i. (#371)
* Add slice Splice an element or multiple elements at index i.

* Update README.md

* Update slice.go

* Update slice.go

* Update README.md

* Update slice_test.go

---------

Co-authored-by: wenlingang <lingang.wen@longbridge.sg>
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2024-06-29 20:25:42 +02:00
Samuel Berthe
80bb7cefc6 feat: adding RejectMap (#473) 2024-06-27 16:17:40 +02:00
Samuel Berthe
91b5d9480e feat: adding FilterReject (#472) 2024-06-27 16:12:34 +02:00
Benn Huang
dba7426c43 fix (#256) 2022-11-15 20:36:05 +01:00
VictorAssunc
640e00c286 chore: test coverage improvement (#240)
* chore: improves channel functions test coverage

* chore: improves errors functions test coverage

* chore: improves map functions test coverage

* chore: improves parallel slice functions test coverage

* chore: improves slice functions test coverage

* fix: uses atomic counter on parallel/slice_test

* Update channel_test.go

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2022-10-22 19:05:07 +02:00
Samuel Berthe
e3f7dab5ce doc: improve doc for lo.Interleave 2022-10-10 23:03:09 +02:00
dillonstreator
fd5527feb6 add Interleave helper to slices (#155)
* initial interleave working

* add nil case

* Update README.md

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2022-10-10 22:53:40 +02:00
Samuel Berthe
f44773e344 feat: adding CountValuesBy 2022-10-10 21:26:19 +02:00
orccn
5f3a5c0f60 Add CountValues function (#200)
* Flatten: named return parameters

* Add CountValues function

* fix S1036: unnecessary guard around map access

* update README.md

Co-authored-by: 刘鹏宇 <liupengyu@showmac.com>
2022-10-10 20:59:41 +02:00
Samuel Berthe
cc3aa2287b doc(examples): adding go playground examples (string, map, slice, condition, math) 2022-10-03 22:17:15 +02:00
Samuel Berthe
31f3bc3a85 test: parallel tests everywhere (#228) 2022-10-02 21:38:26 +02:00
Samuel Berthe
7a82347b1b doc: adding IsSorted and IsSortedByKey 2022-07-24 22:57:58 +02:00
fffzlfk
add5ee4bb2 feat: add issorted (#152) 2022-07-24 22:47:12 +02:00
xhdnoah
c6e4913100 Add ReduceRight (#178)
Co-authored-by: xuhaidong_dxm <xuhaidong01@duxiaoman.com>
2022-07-24 19:20:35 +02:00
elvis
20debbb39e add Associate function (#185) 2022-07-24 19:15:07 +02:00
Syuparn
252d72a238 feat: adding Compact (#154)
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2022-07-03 21:30:17 +02:00
Nonua
1493eadd47 feat: add Slice (#171)
feat: add `Slice`
2022-07-03 19:07:41 +02:00
lu4p
305f565368 remove unnecessary explicit typeparams (#134) 2022-05-11 13:10:36 +02:00
Samuel Berthe
e0853ca970 feat: Add FromAnySlice (#133)
* feat: adding FromAnySlice helper
2022-05-10 15:43:34 +02:00
Adam Szaraniec
fda38bb721 rename to toAnySlice 2022-05-10 16:49:21 +04:00
Adam Szaraniec
a9556597dc Add function ToInterfaceSlice which return slice with all elements mapped to any type 2022-05-10 14:33:47 +04:00
Samuel Berthe
d2d7090565 fix(lo.Shuffle): add more items to tests, to prevent same result than initial value 2022-05-02 14:44:15 +02:00
Samuel Berthe
94d54a8f47 feat: adding runelength 2022-05-01 00:22:36 +02:00
Samuel Berthe
d22a2a264d feat: adding Replace and ReplaceAll 2022-04-30 23:23:09 +02:00
Samuel Berthe
2552cd5e0d feat: adding RepeatBy 2022-04-30 21:18:08 +02:00
Samuel Berthe
ee50be0e93 move drop functions 2022-04-19 00:33:50 +02:00
Ferdinand Mütsch
fc06d108c8 chore(test): add test for foreach 2022-04-11 22:11:25 +02:00
Samuel Berthe
3df5ddb66e Merge pull request #88 from xiaosongfu/feat-filtermap
feat: add FilterMap
2022-04-11 20:23:44 +02:00
xiaosongfu
6ca94a9dcc feat: add FilterMap 2022-04-08 20:07:00 +08:00
CorentinClabaut
c2038bd296 Add Group/GroupBy implementation 2022-03-23 09:00:56 +01:00
Samuel Berthe
6f2bdeb7a2 Merge branch 'master' into master 2022-03-20 01:56:08 +01:00
Thet Naing Tun
640f087f0f change name from ToMap to KeyBy in test 2022-03-12 20:28:35 +06:30
nisingh
17cfa9e69e Add Reject implementation 2022-03-12 02:36:24 +05:30
Yusuke Yajima
4785574798 Add FlatMap 2022-03-08 13:17:03 +09:00
Samuel Berthe
2d3ea84ba6 feat: adding attempt + repeat + times 2022-03-05 21:24:37 +01:00
Samuel Berthe
0c3545daf3 feat: adding lo.PartitionBy + lop.PartitionBy + lo.GroupBy 2022-03-05 18:44:39 +01:00
Samuel Berthe
60559e145a adding index arguments to Map, ForEach and Reduce 2022-03-03 14:07:25 +01:00
Bluskript
d1c9c5f04b make Filter have a second argument for index 2022-03-03 07:29:16 -05:00
Samuel Berthe
74b7c77702 Initial commit 2022-03-02 13:52:01 +01:00