Commit Graph

367 Commits

Author SHA1 Message Date
Samuel Berthe 6f42e74a11 doc: improve examples 2026-03-02 16:06:51 +01:00
Samuel Berthe ff0e293ce3 feat: adding FilterErr helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe 4bb58fd2c6 feat: adding RepeatByErr helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe 72a33aa397 feat: adding FilterKeysErr + FilterValuesErr helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe dd1d58e324 feat: adding FindDuplicatesByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 693e1ce3a8 feat: adding FilterMapToSliceErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 7c55e5b6e3 feat: adding CrossJoinByErrX helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe 8295993219 feat: adding FindErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe e94aa8d408 feat: adding ZipByErrX helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe fcc4f11fb5 💄 2026-03-02 16:06:51 +01:00
Samuel Berthe 4584a0b848 feat: adding LatestByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 2e0b3a19c9 feat: adding EarliestByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 32dce47128 feat: adding MinIndexByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe bef45080d4 feat: adding MaxIndexByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 1db8f69a48 feat: adding KeyByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe fadc3aa9d5 feat: adding MaxByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 1342d124d5 feat: adding PartitionByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 1da649cc26 feat: adding WithoutByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe c9783b717b feat: adding MinByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 75474ff444 feat: adding GroupByErr+CountByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 153f867680 feat: adding MeanByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 788fb2997c feat: adding OmitByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 2fac7c49dd feat: adding PickByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 361866b4d4 feat: adding ReduceRightErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 20d76196f2 feat: adding ReduceErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 12e2b4ceb4 feat: adding SumByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 75d813d292 feat: adding FlatMapErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe b1263d4a41 feat: adding MapValuesErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe d4146ceb18 feat: adding MapKeysErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 105f9555f0 doc(exp,simd): adding warning about API stability for code under exp/ (#808) 2026-02-21 19:49:03 +01:00
Varun Chawla 0b4623da1e fix: make Ellipsis operate on runes instead of bytes to prevent Unicode truncation (#796)
* fix: make Ellipsis operate on runes instead of bytes to prevent Unicode truncation

The Ellipsis function previously used byte-based length counting (len(str))
and byte-based slicing (str[:length-3]), which could split multi-byte
Unicode characters in the middle, producing garbled output.

This changes the function to use []rune conversion so the length parameter
counts Unicode code points instead of bytes. Emoji, CJK ideographs, and
other multi-byte characters are now never split in the middle.

Fixes #520

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: avoid rune slice allocation in Ellipsis

Use range-based iteration to count runes without allocating a []rune
slice, per reviewer suggestion. The early-return for length < 3 is
kept explicit for clarity.

* Simplify Ellipsis: remove early return for length < 3, reuse ellipsis const

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 19:29:10 +01:00
Samuel Berthe cbdb302c7e Added sponsorship
Added sponsorship section to README with DBOS details.
2026-02-19 15:57:21 +01:00
Samuel Berthe fedd0b6d2d doc: explain chunkstring inconsistency (#789)
* doc: explain chunkstring inconsistency

* doc: explain chunkstring inconsistency
2026-01-27 18:53:04 +01:00
Seth Isernhagen 37c07828c3 Fix Clone() go playground link in README (#761)
- fix copy-paste error in README.md

Why?

New link points to the correct Go playground example for Clone() method.
2026-01-07 17:28:34 +01:00
Yuliya b6154d0f8d feat: add Take, TakeWhile, FilterTake, Window, and Sliding functions (#760)
* feat: add Take, TakeWhile, FilterTake, Window, and Sliding functions

Add five new slice manipulation functions with tests, examples, and documentation.

* improve Take function safety and add benchmarks

* rename FilterTake to TakeFilter and add README docs

* remove Window and Sliding benchmarks

* apply gofmt and fix linter errors

* apply gofmt and fix linter errors
2026-01-07 17:28:08 +01:00
Samuel Berthe d99edab80d Refactoring lo.IntersectBy + adding loit.IntersectBy + adding doc (#739)
* feat(intersectby): form transform callback in first position and add support for vaarg

* feat(it): adding loit.IntersectBy

* doc: adding lo.IntersectBy + loit.IntersectBy

* doc: adding lo.IntersectBy + loit.IntersectBy

* style: fix linter

* doc: adding example for lo.IntersectBy
2025-11-07 01:23:34 +01:00
Nathan Baulch e7386d9246 lint: fix inconsistent callback function parameter names (#730)
* Fix linting

* Use is.ElementsMatch

This will ignore the ordering of the final intersection. Especially
important when checking old versions of go that do not guarantee an order
when iterating through maps.

* lint: fix inconsistent callback function parameter names

* lint: rename "iteratee" to "transform" for *Map helpers

* lint: rename "project" parameters to "transform"

* lint: rename "cb" parameters to "callback"

* lint: rename "iteratee" to "callback" for ForEach helpers

---------

Co-authored-by: Franky W. <frankywahl@users.noreply.github.com>
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-11-06 18:05:11 +01:00
Nathan Baulch 48d8fe40e5 fix: rename IsSortedByKey to IsSortedBy (#735)
* Fix linting

* Use is.ElementsMatch

This will ignore the ordering of the final intersection. Especially
important when checking old versions of go that do not guarantee an order
when iterating through maps.

* fix: rename IsSortedByKey to IsSortedBy

---------

Co-authored-by: Franky W. <frankywahl@users.noreply.github.com>
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-11-06 17:54:13 +01:00
quexer 41f7af2114 Add Clone function to return shallow copy of slice collections (#732)
* Initial plan

* Add Clone function to return shallow copy of slice collection

Co-authored-by: quexer <92157+quexer@users.noreply.github.com>

* Update slice.go

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>

* Update slice_test.go

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>

* doc and test

* Apply suggestions from code review

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: quexer <92157+quexer@users.noreply.github.com>
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-11-06 17:47:04 +01:00
Franky W. ed8ee742a6 Allow Union/Intersect to take many lists (#181)
* Allow Union to take many lists

* Allow Intersect to take many lists

* Allow for any number of intersection arguments

* Do not use recursion

Optimize Intersect to avoid using recursion and reduce computation

* Add ExampleIntersect

Adds an example test for intersect

* Add example for Intersect in Readme

* Update docs for Intersect
2025-11-05 23:04:41 +01:00
Samuel Berthe ffc3e1880a doc(maxby): adding comment to explain inconsistency (#727) 2025-11-05 19:34:20 +01:00
Samuel Berthe 734a6b156c feat(it): adding loit.Concat (#722) 2025-10-25 21:11:08 +02:00
Samuel Berthe 56c9241b83 style: move img/ directory into docs/static/img (#721) 2025-10-25 17:29:56 +02:00
Samuel Berthe 7650d43953 chore(dependabot): fix yaml typo 2025-10-20 17:17:11 +02:00
Samuel Berthe f3e6605d3f doc: explain difference between ro and lo 2025-10-14 20:58:25 +02:00
Samuel Berthe 650c9c2034 Fix formatting in README.md links section 2025-10-14 16:27:19 +02:00
Samuel Berthe c7e9459a8b docs: lots of various doc improvements (#706) 2025-10-08 14:55:05 +02:00
Samuel Berthe 8b8aa284f3 fix(doc): make "iter" package visible in doc sidebar 2025-10-06 19:26:51 +02:00
Samuel Berthe 71a4a8c34a doc: add link to documentation in readme 2025-10-06 17:15:00 +02:00
Samuel Berthe 4d877c7d51 Update README.md 2025-10-04 18:22:46 +02:00