Book
Tasks
Schedule ordinary functions or closed bodies, then join every task explicitly.
Concurrency stays visible
+ says work may run as a task; - says where the program waits for it. Scheduling and synchronization stay visible at statement boundaries. Functions keep ordinary call syntax.
$ calculate = (input) {
^ input + 1
}
+ job = calculate(41)
; do independent work here
- answer = jobPrefer ordinary functions
Spawn an ordinary free-function call when inputs already describe the work. Use a task body for a small local operation, and list every outer value it needs in [captures]. Explicit captures keep shared state reviewable.
Join what you spawn
A task handle is an obligation: every spawn must be joined before process exit. When no overlap is needed, an immediate - { body } block performs the schedule and join together. Task results use the ordinary plain, option, and result return shapes.