This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-dev-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 2c1c7d7 2025/04/10 21:48:09: Generated dev website from
groovy-website@5612bd3
2c1c7d7 is described below
commit 2c1c7d7f4a78482f3354b3565f17dc4763474410
Author: jenkins <[email protected]>
AuthorDate: Thu Apr 10 21:48:09 2025 +0000
2025/04/10 21:48:09: Generated dev website from groovy-website@5612bd3
---
blog/exploring-gatherers4j.html | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/blog/exploring-gatherers4j.html b/blog/exploring-gatherers4j.html
index a32fae4..8776956 100644
--- a/blog/exploring-gatherers4j.html
+++ b/blog/exploring-gatherers4j.html
@@ -884,7 +884,6 @@ but you can achieve a similar thing using either
<code>filterWithIndex</code> or
assert Stream.from('A'..'G')
.filterWithIndex { next, idx -> idx % 3 }
.toList() == ['B', 'C', 'E', 'F']
-<br/></div>
// take every 3rd
assert Stream.from('A'..'G')
@@ -895,12 +894,16 @@ assert Stream.from('A'..'G')
var result = []
Stream.from('A'..'G').tapEvery(3) { result << it }.toList()
assert result == ['C', 'F']
-result = []</code></pre>
+result = []
+<br/></div></code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_droplast_dropright">dropLast, dropRight</h3>
+<div class="paragraph">
+<p>The <code>dropLast</code> gatherer removes the last n elements from the
stream:</p>
+</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code data-lang="groovy"><div
style="background-color: #ddeedd">
@@ -910,6 +913,9 @@ assert abcde.stream()
<br/></div></code></pre>
</div>
</div>
+<div class="paragraph">
+<p>Groovy provides <code>dropRight</code> for this:</p>
+</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code data-lang="groovy"><div
style="background-color: #ddddee">