✓
Passing This code compiles and runs correctly.
Code
// [parallel] on a mid-chain invocation forks sibling binds to the pool:
// slot + spawnWg + cooperative waitAndWork join. fib(22) = 17711.
import std/io
pub tor fib { n: i64 } -> i64
fib = if(n < 2)
| then -> n
| else |> [parallel]fib(n: n - 1): a |> [parallel]fib(n: n - 2): b -> a + b
fib(n: 22): r |> std/io:print.ln("{{ r:d }}")
Actual
17711
Expected output
17711
Flows
subflow ~fib click a branch to expand · @labels scroll to their anchor
if (n < 2)
flow ~fib click a branch to expand · @labels scroll to their anchor
fib (n: 22)
Test Configuration
MUST_RUN