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
Trim21
42a90a0c7b
remove golang.org/x/exp since it doesn't follow go 1 compatibility promise ( #478 )
...
* fix
* mod tidy
* remove test
* redirect cmp.Ordered
* fix
* fix
* fix
2024-06-29 18:03:44 +02:00
Samuel Berthe
61209816d1
feat: speed up loops by reducing allocations ( #475 )
2024-06-28 01:35:57 +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
Samuel Berthe
d1c7f3ae19
Update slice.go
2023-12-20 00:47:09 +01:00
Samuel Berthe
c1cc5a0a15
bump v1.38.0
2023-03-20 18:06:26 +01:00
Trim21
adcf8499eb
perf: preallocate Filter,Compact result slice ( #285 )
...
* preallocate `Filter`, Compact result slice
2023-02-20 02:55:30 +01:00
Adam Szaraniec
17e921399f
minor changes ( #301 )
2023-01-30 17:10:13 +01:00
Anatoly Rugalev
0ed7b6eb2a
fix: set map capacity in Associate ( #282 )
2022-12-09 16:09:44 +01:00
Benn Huang
dba7426c43
fix ( #256 )
2022-11-15 20:36:05 +01:00
jiajie99
3206009698
docs: change wrong word 'round-robbin' to 'round-robin' ( #249 )
2022-10-16 13:39:31 +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
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
4fecc9049c
doc: adding examples ( #230 )
2022-10-03 19:19:15 +02:00
Trim21
459062d4ad
Slice can take any slice (#207 )
2022-09-15 10:28:09 +02:00
y.okamoto
c3c78528e5
fix: typo on comment of SliceToMap function ( #213 )
2022-09-15 10:21:40 +02:00
Sergei Makarov
bfae21c5e3
Fix: up to 80% speed and memory optimizations for slices ( #215 )
...
* slice optimizations
2022-09-15 10:18:54 +02:00
Samuel Berthe
a4816ee5ff
adding alias lo.SliceToMap -> lo.Associate
2022-07-29 11:59:00 +02:00
Samuel Berthe
136691e8f3
oops
2022-07-24 23:20:29 +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
Samuel Berthe
03b4947e91
reorder things
2022-07-24 22:29:10 +02:00
Samuel Berthe
af87abb7b0
improves doc for lo.ReduceRight
2022-07-24 19:25:05 +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
Samuel Berthe
0d64a89dcf
Merge branch 'master' of github.com:samber/lo
2022-07-03 22:23:36 +02:00
Samuel Berthe
9d6cf65dd8
doc
2022-07-03 22:23:27 +02:00
orccn
833e68a572
Flatten: named return parameters ( #158 )
2022-07-03 22:14:30 +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
Samuel Berthe
36276f8cdd
doc: clarify Subset vs Slice
2022-07-03 19:13:35 +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
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
Samuel Berthe
b527d40e23
Merge branch 'master' into master
2022-04-12 01:17:01 +02:00