menu_book Course Curriculum (Gleam) expand_more
Language Basics
Types & Data
Functions & Modules
Higher-order functions
Learn Higher-order functions in Gleam with a focused explanation, a topic-specific example, and a mastery check.
12 min read
•
Intermediate
gleam-019.gleam
gleam
pub fn apply_twice(f, x) { f(f(x)) }
pub fn main() { io.debug(apply_twice(fn(x) { x + 3 }, 1)) }
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content