12 Commits

Author SHA1 Message Date
Martin Angers
eec8e87fed Revert "Re-orangize code for compitable"
This reverts commit 6802fc5555.
2024-09-06 10:14:32 -04:00
amikai
6802fc5555 Re-orangize code for compitable
- We don't need to use the iter.Seq2 type; instead, we can use func(yield func(int, *Selection) bool). In fact, the underlying type of iter.Seq2 is func(yield func(int, *Selection) bool), so we don't need to upgrade the go.mod version.
- For for-range testing in version 1.23, we can use build tags to compile only for versions above 1.23.
2024-07-24 15:02:18 +08:00
amikai
3f0ba08339 Support EachIter based on 1.23 iterator 2024-07-20 11:38:01 +08:00
Jonathan Wilsson
ce7330a252 Pre-allocate slice in generic Map function 2024-02-28 21:02:30 +01:00
Martin Angers
1fad3d426b Implement Selection.Map by calling the generic Map
Tests pass and verified that benchmarks are basically the same,
including memory allocation.
2024-02-22 17:08:26 -05:00
Amelia
65c0ed3569 Impl PuerkitoBio/goquery#466 2024-02-22 17:12:50 +01:00
Martin Angers
aeecb06b1e doc: better explain the arguments to the function passed to Each and Map, closes #107 2016-05-26 08:12:20 -04:00
Martin Angers
2c6687f6d3 lint 2014-04-11 12:00:17 -04:00
Martin Angers
948b88c36f add EachWithBreak(), fixes #13 2013-05-24 11:25:42 -04:00
Martin Angers
2d885ccd3a add tests for End() rollbacks, doc 2012-09-05 09:35:53 -04:00
Martin Angers
8ddd8c6655 finalize iterators, with tests and comments. 2012-09-01 10:55:01 -04:00
Martin Angers
de74d0bf97 reorganize code in what seems like a sane structure 2012-08-30 17:35:41 -04:00