Examples
Real Saga programs showing the language in action.
01
Hello World
The simplest Saga program.
02Binary Search Tree
A functional BST with insert, contains, and in-order traversal using ADTs and recursion.
03Validation with Error Accumulation
Collect all validation errors instead of stopping at the first one, using continuations.
04File I/O
Reading, writing, and deleting files with the File effect and ADT error types.
05Async Tasks
Spawning concurrent tasks and collecting results with the Async effect.
06Supervisor
Automatic retry with a limit using the supervised handler pattern.
07N-Queens Solver
Backtracking search using Choose + Fail effects with multishot continuations.
08Ambient Context
Request-scoped values and audit logs as effects, replacing argument plumbing and the Reader/Writer monads.