aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter2_flow_control/lesson01_case_expressions/code.gleam
blob: 6e1ed46da4651dfe232bb54d750c143b6bd539c9 (plain)
1
2
3
4
5
6
7
8
9
10
import gleam/io
import gleam/int

pub fn main() {
  let result = case int.random(5) {
    0 -> "It's zero!"
    other -> "It's " <> int.to_string(other)
  }
  io.debug(result)
}