menu_book Course Curriculum (Gleam) expand_more
Language Basics
Types & Data
Functions & Modules
Custom types
Learn Custom types in Gleam with a focused explanation, a topic-specific example, and a mastery check.
12 min read
•
Beginner
Advertisement
gleam-009.gleam
gleam
pub type Role { Admin Member Guest }
pub fn can_edit(role) { case role { Admin -> True _ -> False } }
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content