Examples

Explore Roc through small, runnable examples.

Getting started

Types and functions

Collections and iteration

Error handling

Parsing and encoding

Programs and algorithms

Organizing code

Packages

Platforms

basic-cli


These examples are built and tested with Roc nightly-2026-10-09-258ab27, unless noted otherwise.

Their source comes from roc-lang/examples at 0457fea.