From 4efb34bd728732101432843ed0bfbeb971272287 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 21 Dec 2023 14:03:41 +0000 Subject: Add chapters --- lessons/src/lesson035_nil/code.gleam | 11 ----------- lessons/src/lesson035_nil/text.html | 15 --------------- 2 files changed, 26 deletions(-) delete mode 100644 lessons/src/lesson035_nil/code.gleam delete mode 100644 lessons/src/lesson035_nil/text.html (limited to 'lessons/src/lesson035_nil') diff --git a/lessons/src/lesson035_nil/code.gleam b/lessons/src/lesson035_nil/code.gleam deleted file mode 100644 index c28080b..0000000 --- a/lessons/src/lesson035_nil/code.gleam +++ /dev/null @@ -1,11 +0,0 @@ -import gleam/io - -pub fn main() { - let x = Nil - io.debug(x) - - // let y: List(String) = Nil - - let result = io.println("Hello!") - io.debug(result == Nil) -} diff --git a/lessons/src/lesson035_nil/text.html b/lessons/src/lesson035_nil/text.html deleted file mode 100644 index 3416643..0000000 --- a/lessons/src/lesson035_nil/text.html +++ /dev/null @@ -1,15 +0,0 @@ -

- Nil is Gleam's unit type. It is a value that is returned by - functions that have nothing else to return, as all functions much return - something. -

-

- Nil is not a valid value of any other types, that is values in - Gleam are not nullable. If the type of a value is Nil then it is - the value nil. If it is some other type then the value is not - Nil. -

-

- Uncomment the line that assigns Nil to a variable with an - incompatible type annotation to see the comile time error it produces. -

-- cgit v1.2.3