aboutsummaryrefslogtreecommitdiff
path: root/lessons/src/lesson002_unqualified_imports
diff options
context:
space:
mode:
Diffstat (limited to 'lessons/src/lesson002_unqualified_imports')
-rw-r--r--lessons/src/lesson002_unqualified_imports/code.gleam10
-rw-r--r--lessons/src/lesson002_unqualified_imports/text.html15
2 files changed, 0 insertions, 25 deletions
diff --git a/lessons/src/lesson002_unqualified_imports/code.gleam b/lessons/src/lesson002_unqualified_imports/code.gleam
deleted file mode 100644
index 2708f25..0000000
--- a/lessons/src/lesson002_unqualified_imports/code.gleam
+++ /dev/null
@@ -1,10 +0,0 @@
-// Import the module and one of its functions
-import gleam/io.{println}
-
-pub fn main() {
- // Use the function in a qualified fashion
- io.println("This is qualified")
-
- // Or an unqualified fashion
- println("This is unqualified")
-}
diff --git a/lessons/src/lesson002_unqualified_imports/text.html b/lessons/src/lesson002_unqualified_imports/text.html
deleted file mode 100644
index 8fda45e..0000000
--- a/lessons/src/lesson002_unqualified_imports/text.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<p>
- Normally functions from other modules are used in a qualified fashion, with
- the module qualifier before function name. For example,
- <code>io.println("Hello!")</code>.
-</p>
-<p>
- It is also possible to specify a list of functions to import from a module in
- an unqualified fashion, such as the <code>println</code> function in the code
- editor. Because it has been imported like this it can be referred to as just
- <code>println</code>.
-</p>
-<p>
- Generally it is best to use qualified imports, as this makes it clear where
- the function is defined, making the code easier to read.
-</p>