Skip to content

Commit

Permalink
Add chapters
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed Dec 21, 2023
1 parent 2a6ae1f commit 4efb34b
Show file tree
Hide file tree
Showing 82 changed files with 157 additions and 147 deletions.
22 changes: 0 additions & 22 deletions lessons/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions lessons/gleam.toml

This file was deleted.

11 changes: 0 additions & 11 deletions lessons/manifest.toml

This file was deleted.

12 changes: 0 additions & 12 deletions lessons/test/lessons_test.gleam

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ pub fn main() {
let even = list.filter(ints, fn(x) { x % 2 == 0 })
io.debug(even)

let total = list.fold(ints, from: 0, with: fn(count, e) { count + e })
let total = list.fold(ints, 0, fn(count, e) { count + e })
io.debug(total)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import gleam/io
import gleam/int

pub fn main() {
let result = case int.random(0, 5) {
let result = case int.random(5) {
0 -> "It's zero!"
other -> "It's " <> int.to_string(other)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import gleam/io
import gleam/int

pub fn main() {
let x = int.random(0, 5)
let x = int.random(5)
io.debug(x)

let result = case x {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import gleam/int
import gleam/list

pub fn main() {
let x = list.repeat(int.random(0, 5), times: int.random(0, 3))
let x = list.repeat(int.random(5), times: int.random(3))
io.debug(x)

let result = case x {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 4efb34b

Please sign in to comment.