menu_book Course Curriculum (Gleam) expand_more
Language Basics
Types & Data
Functions & Modules
Case expressions
Learn Case expressions in Gleam with a focused explanation, a topic-specific example, and a mastery check.
12 min read
•
Beginner
gleam-007.gleam
gleam
pub fn main() {
let code = 404
let label = case code { 200 -> "ok" 404 -> "missing" _ -> "other" }
io.println(label)
}
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content