aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter4_standard_library/lesson04_option_module/code.gleam
blob: eb60001e66b5e6205b46048f64aafc35e0820938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import gleam/io
import gleam/option.{type Option, None, Some}

pub type Person {
  Person(name: String, pet: Option(String))
}

pub fn main() {
  let person_with_pet = Person("Al", Some("Nubi"))
  let person_without_pet = Person("Maria", None)

  io.debug(person_with_pet)
  io.debug(person_without_pet)
}