aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter5_advanced_features/lesson00_use/en.html
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2024-03-26 13:57:31 +0000
committerLouis Pilfold <louis@lpil.uk>2024-03-26 13:57:31 +0000
commitc2dcbe0f25a3e8bd60a4ccf377bbdd47f4794871 (patch)
tree18862644ee2dada0a926392b11e606bb0d2262f7 /src/content/chapter5_advanced_features/lesson00_use/en.html
parentccf75d2c362ac8e4dcd12c781f6e1eafd0064813 (diff)
downloadtour-c2dcbe0f25a3e8bd60a4ccf377bbdd47f4794871.tar.gz
tour-c2dcbe0f25a3e8bd60a4ccf377bbdd47f4794871.zip
Document opaque types
Closes https://github.com/gleam-lang/language-tour/issues/63
Diffstat (limited to 'src/content/chapter5_advanced_features/lesson00_use/en.html')
-rw-r--r--src/content/chapter5_advanced_features/lesson00_use/en.html31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/content/chapter5_advanced_features/lesson00_use/en.html b/src/content/chapter5_advanced_features/lesson00_use/en.html
deleted file mode 100644
index b8e2641..0000000
--- a/src/content/chapter5_advanced_features/lesson00_use/en.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<p>
- Gleam lacks exceptions, macros, type classes, early returns, and a variety of
- other features, instead going all-in with just first-class-functions and
- pattern matching. This makes Gleam code easier to understand, but it can
- sometimes result in excessive indentation.
-</p>
-<p>
- Gleam's use expression helps out here by enabling us to write code that uses
- callbacks in an unindented style, as shown in the code window.
-</p>
-
-<p>
- The higher order function being called goes on the right hand side of the
- <code>&lt;-</code> operator. It must take a callback function as its final
- argument.
-</p>
-<p>
- The argument names for the callback function go on the left hand side of the
- <code>&lt;-</code> operator. The function can take any number of arguments,
- including zero.
-</p>
-<p>
- All the remaining code in the enclosing <code class="hljs">{}</code> block
- becomes the body of the callback function.
-</p>
-<p>
- This is a very capable and useful feature, but excessive application of
- <code>use</code> may result in code that is unclear otherwise, especially to
- beginners. Often using the regular function call syntax will result in more
- approachable code!
-</p>