diff options
author | Louis Pilfold <louis@lpil.uk> | 2024-05-29 20:25:52 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-05-29 20:25:52 +0100 |
commit | c5190f1a5f1fe5ca42a3d89f06c5186cf87eca25 (patch) | |
tree | b2d3f220594b2467300a2f1a4f21eb40454dcc85 | |
parent | 6906edef11a2c034e5b1715933ec852609b1654e (diff) | |
download | tour-c5190f1a5f1fe5ca42a3d89f06c5186cf87eca25.tar.gz tour-c5190f1a5f1fe5ca42a3d89f06c5186cf87eca25.zip |
Upgrade version
6 files changed, 14 insertions, 14 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index caa0f11..8099ed5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,7 +27,7 @@ jobs: - uses: erlef/setup-beam@v1 with: otp-version: "26.0.2" - gleam-version: "1.1.0" + gleam-version: "1.2.0" rebar3-version: "3" - name: Download WASM version of Gleam compiler diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f754191..f9d2adc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: with: otp-version: "26.0.2" # Ensure you update the bin/download-compiler Gleam version to match this - gleam-version: "1.1.0" + gleam-version: "1.2.0" rebar3-version: "3" - run: ./bin/download-compiler - run: gleam deps download diff --git a/src/content/chapter3_data_types/lesson07_results/code.gleam b/src/content/chapter3_data_types/lesson07_results/code.gleam index b613566..67a2559 100644 --- a/src/content/chapter3_data_types/lesson07_results/code.gleam +++ b/src/content/chapter3_data_types/lesson07_results/code.gleam @@ -2,10 +2,10 @@ import gleam/int import gleam/io pub fn main() { - io.debug(buy_pastry(10)) - io.debug(buy_pastry(8)) - io.debug(buy_pastry(5)) - io.debug(buy_pastry(3)) + let _ = io.debug(buy_pastry(10)) + let _ = io.debug(buy_pastry(8)) + let _ = io.debug(buy_pastry(5)) + let _ = io.debug(buy_pastry(3)) } pub type PurchaseError { diff --git a/src/content/chapter4_standard_library/lesson01_list_module/code.gleam b/src/content/chapter4_standard_library/lesson01_list_module/code.gleam index 29f2448..ab08ab1 100644 --- a/src/content/chapter4_standard_library/lesson01_list_module/code.gleam +++ b/src/content/chapter4_standard_library/lesson01_list_module/code.gleam @@ -14,6 +14,6 @@ pub fn main() { io.debug(list.fold(ints, 0, fn(count, e) { count + e })) io.println("=== find ===") - io.debug(list.find(ints, fn(x) { x > 3 })) + let _ = io.debug(list.find(ints, fn(x) { x > 3 })) io.debug(list.find(ints, fn(x) { x > 13 })) } diff --git a/src/content/chapter4_standard_library/lesson02_result_module/code.gleam b/src/content/chapter4_standard_library/lesson02_result_module/code.gleam index ec7039b..423938a 100644 --- a/src/content/chapter4_standard_library/lesson02_result_module/code.gleam +++ b/src/content/chapter4_standard_library/lesson02_result_module/code.gleam @@ -4,13 +4,13 @@ import gleam/result pub fn main() { io.println("=== map ===") - io.debug(result.map(Ok(1), fn(x) { x * 2 })) - io.debug(result.map(Error(1), fn(x) { x * 2 })) + let _ = io.debug(result.map(Ok(1), fn(x) { x * 2 })) + let _ = io.debug(result.map(Error(1), fn(x) { x * 2 })) io.println("=== try ===") - io.debug(result.try(Ok("1"), int.parse)) - io.debug(result.try(Ok("no"), int.parse)) - io.debug(result.try(Error(Nil), int.parse)) + let _ = io.debug(result.try(Ok("1"), int.parse)) + let _ = io.debug(result.try(Ok("no"), int.parse)) + let _ = io.debug(result.try(Error(Nil), int.parse)) io.println("=== unwrap ===") io.debug(result.unwrap(Ok("1234"), "default")) diff --git a/src/content/chapter5_advanced_features/lesson01_use/code.gleam b/src/content/chapter5_advanced_features/lesson01_use/code.gleam index e7b435b..110c154 100644 --- a/src/content/chapter5_advanced_features/lesson01_use/code.gleam +++ b/src/content/chapter5_advanced_features/lesson01_use/code.gleam @@ -2,8 +2,8 @@ import gleam/io import gleam/result pub fn main() { - io.debug(without_use()) - io.debug(with_use()) + let _ = io.debug(without_use()) + let _ = io.debug(with_use()) } pub fn without_use() { |