From 4efb34bd728732101432843ed0bfbeb971272287 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 21 Dec 2023 14:03:41 +0000 Subject: Add chapters --- src/content/chapter0_basics/lesson01_basics/code.gleam | 7 +++++++ src/content/chapter0_basics/lesson01_basics/text.html | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/content/chapter0_basics/lesson01_basics/code.gleam create mode 100644 src/content/chapter0_basics/lesson01_basics/text.html (limited to 'src/content/chapter0_basics/lesson01_basics') diff --git a/src/content/chapter0_basics/lesson01_basics/code.gleam b/src/content/chapter0_basics/lesson01_basics/code.gleam new file mode 100644 index 0000000..67cc6b4 --- /dev/null +++ b/src/content/chapter0_basics/lesson01_basics/code.gleam @@ -0,0 +1,7 @@ +// Import a Gleam module from the standard library +import gleam/io + +pub fn main() { + // Print to the console + io.println("Hello, Joe!") +} diff --git a/src/content/chapter0_basics/lesson01_basics/text.html b/src/content/chapter0_basics/lesson01_basics/text.html new file mode 100644 index 0000000..8e2033a --- /dev/null +++ b/src/content/chapter0_basics/lesson01_basics/text.html @@ -0,0 +1,17 @@ +

+ Here is a program that prints out the text "Hello, Joe!". +

+

+ It does this by using the `println` function which has been imported from the + gleam/io + module, which is part of the Gleam standard library. +

+

+ In a normal Gleam program this program would be run use the command + gleam run on the command line, but here in this tutorial the + program is automatically compiled and run as the code is edited. +

+

+ Try changing the text being printed to Hello, Mike! and see what + happens. +

-- cgit v1.2.3