Commit Graph

63 Commits

Author SHA1 Message Date
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
Samuel Berthe
356f3bdb11 Merge branch 'master' into master 2022-04-11 20:43:10 +02:00
Samuel Berthe
be023ef06e Merge pull request #87 from xiaosongfu/fix-func-comment
fix func comment warning
2022-04-11 20:32:15 +02:00
Samuel Berthe
acc3953123 💄 2022-04-11 20:30:34 +02:00
Samuel Berthe
3df5ddb66e Merge pull request #88 from xiaosongfu/feat-filtermap
feat: add FilterMap
2022-04-11 20:23:44 +02:00
Samuel Berthe
74f4bf7ffd 💄 2022-04-11 20:16:47 +02:00
xiaosongfu
6ca94a9dcc feat: add FilterMap 2022-04-08 20:07:00 +08:00
xiaosongfu
0c64f2c093 fix func comment warning 2022-04-08 19:19:57 +08:00
Sergey Dobrodey
1f98b30a4b slice.go: GroupBy
reduce number of reads
2022-03-25 17:31:15 +02:00
CorentinClabaut
c2038bd296 Add Group/GroupBy implementation 2022-03-23 09:00:56 +01:00
hyunchul jung
21e6fd98f7 simplify code 2022-03-21 14:45:18 +09:00
Samuel Berthe
10e138a096 merge 2022-03-20 02:00:08 +01:00
Samuel Berthe
6f2bdeb7a2 Merge branch 'master' into master 2022-03-20 01:56:08 +01:00
Thet Naing Tun
af456e1cb7 rename ToMap to KeyBy 2022-03-12 20:23:11 +06:30
nisingh
17cfa9e69e Add Reject implementation 2022-03-12 02:36:24 +05:30