This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits 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 97b352a 2026/05/20 12:23:58: Generated dev website from
groovy-website@232a89a
97b352a is described below
commit 97b352a908a2431c4df516fa0c5a9ac35a22f030
Author: jenkins <[email protected]>
AuthorDate: Wed May 20 12:23:58 2026 +0000
2026/05/20 12:23:58: Generated dev website from groovy-website@232a89a
---
blog/groovy6-functional.html | 17 +++++++++--------
search/search-index.json | 2 +-
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/blog/groovy6-functional.html b/blog/groovy6-functional.html
index 614a0a3..c73b899 100644
--- a/blog/groovy6-functional.html
+++ b/blog/groovy6-functional.html
@@ -286,13 +286,12 @@ declarations, no lift / unlift:</p>
</div>
<div class="listingblock">
<div class="content">
-<pre class="prettyprint highlight"><code
data-lang="groovy">@TypeChecked(extensions =
['groovy.typecheckers.PurityChecker(allows: "LOGGING")',
- 'groovy.typecheckers.ModifiesChecker'])
-class Calculator {
+<pre class="prettyprint highlight"><code data-lang="groovy">class Calculator {
BigDecimal total = 0
List<String> ledger = []
@Pure
+ @TypeChecked(extensions = 'groovy.typecheckers.PurityChecker')
static BigDecimal vat(BigDecimal net, BigDecimal rate) {
net * (1 + rate)
}
@@ -300,12 +299,14 @@ class Calculator {
@Requires({ amount > 0 })
@Ensures ({ total == old.total + amount })
@Modifies({ [this.total, this.ledger] })
+ @TypeChecked(extensions = 'groovy.typecheckers.ModifiesChecker')
void post(BigDecimal amount) {
total += amount
ledger << "+$amount"
}
@Pure
+ @TypeChecked(extensions = 'groovy.typecheckers.PurityChecker(allows:
"LOGGING")')
BigDecimal balance() {
log.fine "balance read"
total
@@ -334,11 +335,11 @@ state-transition function — pre- and post-conditions,
with `old.</code>
referring to pre-state.</p>
</li>
<li>
-<p><code>balance</code> is pure <em>modulo logging</em>. The checker’s
<code>allows</code> option
-declares a small effect lattice (<code>LOGGING</code>, <code>METRICS</code>,
<code>IO</code>,
-<code>NONDETERMINISM</code>) and tolerates calls in those categories from any
-<code>@Pure</code> method in scope — graded effects, in the cats-effect sense,
-but the verification work is in the checker rather than the type.</p>
+<p><code>balance</code> is pure <em>modulo logging</em>. Its
<code>@TypeChecked</code> extension
+configures <code>PurityChecker(allows: "LOGGING")</code>; the
<code>allows</code> option
+draws from a small effect lattice (<code>LOGGING</code>, <code>METRICS</code>,
<code>IO</code>,
+<code>NONDETERMINISM</code>) — graded effects, in the cats-effect sense, but
+the verification work is in the checker rather than the type.</p>
</li>
</ul>
</div>
diff --git a/search/search-index.json b/search/search-index.json
index fdb7d5c..27f8393 100644
--- a/search/search-index.json
+++ b/search/search-index.json
@@ -240,7 +240,7 @@
{
"id": "blog/groovy6-functional.html",
"title": "The Apache Groovy programming language - Blogs - Groovy 6
features for Functional Programmers",
- "content": "The Apache Groovy programming language - Blogs - Groovy 6
features for Functional Programmers Socialize Discuss on the mailing list
Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and
conferences Source code on GitHub Report issues in Jira Stack Overflow
questions Slack Community You are using an outdated browser. Please upgrade
your browser to improve your experience. Apache Groovy™ Learn
Documentation Download Support Contribute Ecos [...]
+ "content": "The Apache Groovy programming language - Blogs - Groovy 6
features for Functional Programmers Socialize Discuss on the mailing list
Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and
conferences Source code on GitHub Report issues in Jira Stack Overflow
questions Slack Community You are using an outdated browser. Please upgrade
your browser to improve your experience. Apache Groovy™ Learn
Documentation Download Support Contribute Ecos [...]
"url": "blog/groovy6-functional.html",
"site": "dev"
},