This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 39a9b98 draft gatherers4j blog post (minor tweaks)
39a9b98 is described below
commit 39a9b98029105f4ba89af3eddfc6ae8ce43ffed3
Author: Paul King <[email protected]>
AuthorDate: Fri Apr 11 08:04:45 2025 +1000
draft gatherers4j blog post (minor tweaks)
---
site/src/site/blog/exploring-gatherers4j.adoc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/site/src/site/blog/exploring-gatherers4j.adoc
b/site/src/site/blog/exploring-gatherers4j.adoc
index 85ab365..41473a4 100644
--- a/site/src/site/blog/exploring-gatherers4j.adoc
+++ b/site/src/site/blog/exploring-gatherers4j.adoc
@@ -354,7 +354,7 @@ Groovy's `eachWithIndex` provides similar functionality but
exhausts the iterato
{start-blue}
assert abc.iterator().withIndex().tapEvery { tuple ->
println "Element $tuple.first at index $tuple.last"
-}*.first() == abc
+}*.first == abc
{end}
----
@@ -709,12 +709,12 @@ but you either use `findAllLazy` with `withIndex`, or
`tapEvery`:
{start-blue}
// drop every 3rd
assert ('A'..'G').iterator().withIndex()
- .findAllLazy { mext, i -> i % 3 }
+ .findAllLazy { next, i -> i % 3 }
.toList()*.first == ['B', 'C', 'E', 'F']
// take every 3rd
assert ('A'..'G').iterator().withIndex()
- .findAllLazy { mext, i -> i % 3 == 0 }
+ .findAllLazy { next, i -> i % 3 == 0 }
.toList()*.first == ['A', 'D', 'G']
// also take every 3rd