March Cookbook
Practical recipes for getting things done in March. Each chapter covers one topic with short runnable snippets and longer copy-and-run examples. Click run on any code block to try it in the interactive panel on the right.
Chapters
| Chapter | What you’ll learn |
|---|---|
| Basics | Functions, types, pattern matching, let?, modules |
| Strings | Concatenation, interpolation, parsing, formatting |
| CLI | Reading args, flag parsing, files, exit codes |
| HTTP | Making requests, handling responses, simple servers |
| JSON API | Calling an API and decoding the JSON response |
| Files | Reading a CSV, aggregating columns, walking a directory |
| Config | Parsing TOML/YAML with environment overrides |
| Concurrency | Task.async/await, actors, channels |
| Capabilities | The capability system, needs, proof caps |
| Linear Types | linear type, always_linear, typestate handles |
| Vault | In-memory key-value store: CRUD, TTL, namespacing |
| HTML | ~H sigil, Html module, CSRF, layouts |
| DOM | Browser DOM with --target js: elements, events, animation |
| Parallel Data | RRB.Vec + Parallel module: pmap, preduce, psum, pcount |
New to March?
Start with one of these orientation guides:
- Coming from Python — dynamic to static typing, no exceptions, no classes
- Coming from TypeScript — sum types,
Resultvstry/catch, modules instead of classes - Coming from Haskell, Elixir, or OCaml — syntax cheatsheet and key differences
Using this cookbook
Every march code block has copy and run buttons that appear on hover. Clicking run opens the interactive interpreter panel on the right and evaluates the snippet immediately. You can edit the code in the panel and press run again to try variations.
The panel is lazy — the interpreter bundle only loads on your first run click.