1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-03-01 00:35:28 +08:00
Commit Graph

121 Commits

Author SHA1 Message Date
dudaodong df8121fbbd Merge branch 'rc' into v2 2025-02-14 17:13:11 +08:00
dudaodong 0e7297cb97 feat: add ShuffleCopy 2025-02-14 16:33:22 +08:00
dudaodong 2e619e48a3 feat: add ReverseCopy 2025-02-14 16:23:46 +08:00
残念 3069acba4a Merge pull request #293 from YoghurtFree/fix_slice_test
fix(slice_test) , should not assume the order of the slice
2025-02-09 23:10:28 +08:00
jialulu fc43138a0e fix: fix slice_test.go ,We should not assume the order of the slice when using multithreads,sort them before compare 2025-02-09 22:23:35 +08:00
dudaodong ab89f0aee1 feat: add EqualUnordered 2024-12-19 19:36:17 +08:00
残念 a7fecfc73b perf(slice): make the IndexOf function thread-safe (#263) 2024-11-06 10:04:44 +08:00
dudaodong a4e89bd7c1 feat: add ConcatBy 2024-10-24 15:38:12 +08:00
dudaodong 2015d36b08 feat: add JoinFunc 2024-10-24 14:56:13 +08:00
dudaodong c3372e18b1 feat: add Frequency in slice package 2024-09-06 15:06:35 +08:00
dudaodong ec092a009a test: we should write clean unit test code 2024-08-28 16:06:08 +08:00
dudaodong c0b200f846 feat: add ReduceConcurrent 2024-08-15 17:48:26 +08:00
dudaodong 305847993c feat: add ForEachConcurrent 2024-08-15 16:44:22 +08:00
dudaodong f5d70728c3 refactoring: rename param and change its order 2024-08-15 15:50:48 +08:00
dudaodong a360372aa9 feat: add FilterConcurrent 2024-08-14 11:19:10 +08:00
dudaodong 7f78a6b11e refactoring: rename slice_parallel to slice_concurrent 2024-08-14 10:52:36 +08:00
dudaodong 5c53cb5867 feat: add MapConcurrent 2024-08-14 10:45:35 +08:00
dudaodong 8611ec0c10 feat: add UniqueByComparator 2024-08-08 11:23:11 +08:00
dudaodong 3e7f94b03e fix: fix UniqueBy bug 2024-08-08 10:40:23 +08:00
dudaodong 356351896d feat: add UniqueByParallel for slice 2024-08-08 10:20:52 +08:00
dudaodong 95b516e278 feat: add UniqueByField 2024-06-24 19:36:02 +08:00
Cannian 6853d627f4 refactor(slice): optimize function (#211) 2024-04-06 09:16:28 +08:00
donutloop ab50e8120a Slice: padding (#201)
* LeftPadding adds padding to the left begin of a slice.
* RightPadding adds padding to the right end of a slice.
2024-03-10 21:24:17 +08:00
donutloop 5e8a065eaa Slice: break (#200)
Splits a slice into two based on a predicate function. It starts appending to the second slice after the first element that matches the predicate. All elements after the first match are included in the second slice, regardless of whether they match the predicate or not.
2024-03-07 14:11:19 +08:00
donutloop 0e1593c67b Slice: Add SetToDefaultIf (#187)
SetToDefaultIf sets elements to their zero value if they match the given predicate.
It retains the positions of the elements in the slice.
It returns slice of T and the count of modified slice items
2024-02-28 11:27:23 +08:00
dudaodong d2d1e5a055 feat: refact DeleteAt and add DeleteRange function 2024-01-22 15:34:35 +08:00
o98k 3802c715c3 [feature]<slice>: support random item (#146)
Signed-off-by: o98k-ok <hggend@gmail.com>
2023-11-22 16:51:37 +08:00
dudaodong 541e6d4ea3 feat: add Partition for slice 2023-09-04 11:30:50 +08:00
dudaodong d5334f892f feat: add Join 2023-07-10 10:51:43 +08:00
dudaodong 8229de2f10 test: add parallel running for all unit test functions 2023-06-30 10:18:45 +08:00
dudaodong b1c6614549 refactor: clean code 2023-06-01 16:58:42 +08:00
dudaodong 4311b9ac66 test: remove t.Log() 2023-04-26 14:59:45 +08:00
dudaodong 52ea64bc33 feat: add FindLastBy function 2023-04-17 20:17:26 +08:00
燕归来 14bc08c6d6 feat: add FindBy that a result will be without unrefrence #88 (#90)
feat: add example for FindBy

chore: reduce code duplication
2023-04-17 20:11:56 +08:00
dudaodong c01c9d14b4 feat: add ReduceRight 2023-04-04 17:54:54 +08:00
dudaodong f198191063 feat: add ReduceBy 2023-04-04 17:41:37 +08:00
Mickls 3b497532f3 fix: The LastIndexOf method can never return the index of the first element (#83)
Co-authored-by: JiangCheng <jiangcheng@kezaihui.com>
2023-03-28 20:02:57 +08:00
dudaodong 0734f220b3 feat: add ForEachWithBreak support break for each loop 2023-03-15 14:38:33 +08:00
dudaodong 9d2c9806d1 feat: add ContainBy function 2023-02-24 14:19:10 +08:00
dudaodong f3801bcd8f feat: add FlatMap 2023-02-24 11:14:59 +08:00
dudaodong 5767aad303 feat: add FilterMap 2023-02-24 10:55:27 +08:00
dudaodong 75b27c6540 feat: add IsSortedByKey 2023-02-10 10:10:57 +08:00
dudaodong a7e77fa98d feat: add IsSorted 2023-02-09 19:30:11 +08:00
dudaodong abf392117a feat: add IsAscending, Isdescending 2023-02-09 19:25:58 +08:00
dudaodong d231d9f572 feat: add DropRightWhile 2023-02-09 17:53:26 +08:00
dudaodong 97447d058e test: add test and example for DropWhile 2023-02-09 17:46:40 +08:00
dudaodong 040e112aa6 feat: add DropRight and DropWhile 2023-02-09 17:38:31 +08:00
dudaodong 5f0211f0c4 test: add examples for slice package 2023-01-04 14:44:10 +08:00
Mickls d59259bbe0 feat: A more reasonable IndexOf function (#66) 2022-12-09 11:31:40 +08:00
dudaodong 0a8058956f feat: add Count and CountBy function 2022-12-03 13:04:12 +08:00