yield
yield ?value?
Stops the coroutine that runs it and gives the value to the caller. The next call of the coroutine goes on after the yield.
Examples
A click on an example runs it in the shell of the page.
coroutine c apply {{} {set got [yield first]; return "got $got"}}; c hello:got hello
Facts
- Capability: none.
- Compute cost: one compute unit for the call, and more for the commands that it runs.