flan/web/examples/breakdemo.flan
Joseph Ferano 86ef557433 Run the break loop rather than quote it, since the restart order is a claim
NEXT.md prints the banner with the restarts in source order; the walk is
innermost-first, so it is the other way round. A --dev build under timeout is
enough to settle that, and settles the two place and global snippets with it.
2026-09-12 03:43:24 +07:00

16 lines
302 B
Plaintext

(import agent "vendor:agent")
(defstruct Missing [id i32])
(defn load [n i32] i32
(restart-case
(do (error (Missing {:id n}))
0)
(use-placeholder [] -1)
(retry [] 7)))
(defn main []
(agent/start "/tmp/flan-breakdemo.sock")
(print-i64 (i64 (load 1)))
(newline))