From a1c22e954299de5c823ec47cd2f633355764e3b2 Mon Sep 17 00:00:00 2001 From: Dimitrii Dulgher Date: Sat, 13 Apr 2024 00:04:06 +0300 Subject: Add hrefs to code keywords --- .../chapter0_basics/lesson02_modules/en.html | 31 ++++++++++++++++------ 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'src/content/chapter0_basics/lesson02_modules') 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 @@

Gleam code is organized into units called modules. A module is a bunch of definitions (of types, functions, etc.) that seem to belong together. - For example, the gleam/io module contains a variety of functions - for printing, like println. + For example, the + + gleam/io + + module contains a variety of functions for printing, like + + println + .

All gleam code is in some module or other, whose name comes from the - name of the file it's in. For example, gleam/io is in a file - called io.gleam in a directory called gleam. + name of the file it's in. For example, + + gleam/io + + is in a file called io.gleam in a directory called gleam.

For code in one module to access code in another module, we import it using the import keyword, and the name used to refer to it is the last - part of the module name. For example, the gleam/io module is - referred to as io once imported. + part of the module name. For example, the + + gleam/io + + module is referred to as io once imported.

The as keyword can be used to refer to a module by a different - name. See how the gleam/string module is referred to as - text here. + name. See how the + + gleam/string + + module is referred to as text here.

-- cgit v1.2.3