aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter1_functions/lesson04_anonymous_functions/en.html
diff options
context:
space:
mode:
authorellipticview <ellipticview@users.noreply.github.com>2024-05-04 11:32:00 +0200
committerLouis Pilfold <louis@lpil.uk>2024-05-04 14:46:16 +0100
commit71351fcd918ef9e740f257e5040b4b1b6bae6645 (patch)
tree756ac26bddf5cb38a5c37224eaf46e4abd7dd22b /src/content/chapter1_functions/lesson04_anonymous_functions/en.html
parenta27ffa2d6451cc21d37d42181be8db7fca64e1f6 (diff)
downloadtour-71351fcd918ef9e740f257e5040b4b1b6bae6645.tar.gz
tour-71351fcd918ef9e740f257e5040b4b1b6bae6645.zip
Added example to anonymous functions
Diffstat (limited to 'src/content/chapter1_functions/lesson04_anonymous_functions/en.html')
-rw-r--r--src/content/chapter1_functions/lesson04_anonymous_functions/en.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/content/chapter1_functions/lesson04_anonymous_functions/en.html b/src/content/chapter1_functions/lesson04_anonymous_functions/en.html
index 6c6d47d..69606dd 100644
--- a/src/content/chapter1_functions/lesson04_anonymous_functions/en.html
+++ b/src/content/chapter1_functions/lesson04_anonymous_functions/en.html
@@ -1,5 +1,9 @@
<p>
- As well as module-level named functions, Gleam has anonymous function
- literals, written with the <code>fn() { ... }</code> syntax.
+ As well as module-level named functions, Gleam has anonymous function
+ literals, written with the <code>fn() { ... }</code> syntax.
</p>
<p>Anonymous functions can be used interchangeably with named functions.</p>
+<p>
+ Anonymous functions can reference variables that were in scope when they
+ were defined, making them <em>closures</em>.
+</p>