aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter2_flow_control/lesson08_multiple_subjects/code.gleam
blob: d7aa34ae4347f7709ae777aa9ceee48e6163da0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gleam/io
import gleam/int

pub fn main() {
  let x = int.random(2)
  let y = int.random(2)
  io.debug(x)
  io.debug(y)

  let result = case x, y {
    0, 0 -> "Both are zero"
    0, _ -> "First is zero"
    _, 0 -> "Second is zero"
    _, _ -> "Neither are zero"
  }
  io.debug(result)
}