summaryrefslogtreecommitdiff
path: root/examples/functions.fy
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-19 10:20:11 +0200
committerPaul Buetow <paul@buetow.org>2026-02-19 10:20:11 +0200
commit03b874818315e7dc9fb2ccf26716a0fb65242a57 (patch)
treecc375998c809ded77d920f6a2a2a50241018f016 /examples/functions.fy
parent2e81f599a0323e2025883bc1375bf438d1406733 (diff)
Rename func keyword to fun
Replace the `func` language keyword with `fun` throughout: update the scanner's string-to-token mapping, all .fy example scripts, and all documentation files (.txt, .pod, .tex, .man, .html). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'examples/functions.fy')
-rw-r--r--examples/functions.fy6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/functions.fy b/examples/functions.fy
index 15856a0..c5e51e2 100644
--- a/examples/functions.fy
+++ b/examples/functions.fy
@@ -2,10 +2,10 @@
* Examples of how to use functions
*#
-func foo {
+fun foo {
say 1 + a * 3 + b;
- func bar {
+ fun bar {
say "Hello i am nested";
}
@@ -16,7 +16,7 @@ my a = 2, b = 4; # Create global variables
foo;
assert 0 == (defined bar); # bar is not available anymore
-func baz {
+fun baz {
say "I am baz";
undef baz;
}