aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter0_basics/lesson02_modules/en.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/chapter0_basics/lesson02_modules/en.html')
-rw-r--r--src/content/chapter0_basics/lesson02_modules/en.html31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/content/chapter0_basics/lesson02_modules/en.html b/src/content/chapter0_basics/lesson02_modules/en.html
index d26977d..7f34d0b 100644
--- a/src/content/chapter0_basics/lesson02_modules/en.html
+++ b/src/content/chapter0_basics/lesson02_modules/en.html
@@ -1,22 +1,37 @@
<p>
Gleam code is organized into units called <em>modules</em>. A module is a
bunch of definitions (of types, functions, etc.) that seem to belong together.
- For example, the <code>gleam/io</code> module contains a variety of functions
- for printing, like <code>println</code>.
+ For example, the
+ <a href="https://hexdocs.pm/gleam_stdlib/gleam/io.html" target="_blank">
+ <code>gleam/io</code>
+ </a>
+ module contains a variety of functions for printing, like
+ <a href="https://hexdocs.pm/gleam_stdlib/gleam/io.html#println" target="_blank">
+ <code>println</code>
+ </a>.
</p>
<p>
All gleam code is in <i>some</i> module or other, whose name comes from the
- name of the file it's in. For example, <code>gleam/io</code> is in a file
- called <code>io.gleam</code> in a directory called <code>gleam</code>.
+ name of the file it's in. For example,
+ <a href="https://hexdocs.pm/gleam_stdlib/gleam/io.html" target="_blank">
+ <code>gleam/io</code>
+ </a>
+ is in a file called <code>io.gleam</code> in a directory called <code>gleam</code>.
</p>
<p>
For code in one module to access code in another module, we import it using
the <code>import</code> keyword, and the name used to refer to it is the last
- part of the module name. For example, the <code>gleam/io</code> module is
- referred to as <code>io</code> once imported.
+ part of the module name. For example, the
+ <a href="https://hexdocs.pm/gleam_stdlib/gleam/io.html" target="_blank">
+ <code>gleam/io</code>
+ </a>
+ module is referred to as <code>io</code> once imported.
</p>
<p>
The <code>as</code> keyword can be used to refer to a module by a different
- name. See how the <code>gleam/string</code> module is referred to as
- <code>text</code> here.
+ name. See how the
+ <a href="https://hexdocs.pm/gleam_stdlib/gleam/string.html" target="_blank">
+ <code>gleam/string</code>
+ </a>
+ module is referred to as <code>text</code> here.
</p>