Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
menu_book Course Curriculum (Gleam) expand_more
Gleam / Types & Data

Custom types

Learn Custom types in Gleam with a focused explanation, a topic-specific example, and a mastery check.

12 min read • Beginner
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