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

pub type SchoolPerson {
  Teacher(name: String, subject: String)
  Student(String)
}

pub fn main() {
  let teacher1 = Teacher("Mr Schofield", "Physics")
  let teacher2 = Teacher(name: "Miss Percy", subject: "Physics")
  let student1 = Student("Koushiar")
  let student2 = Student("Naomi")
  let student3 = Student("Shaheer")

  let school = [teacher1, teacher2, student1, student2, student3]
  io.debug(school)
}