aboutsummaryrefslogtreecommitdiff
path: root/lib/core/coroutines.nom
diff options
context:
space:
mode:
Diffstat (limited to 'lib/core/coroutines.nom')
-rw-r--r--lib/core/coroutines.nom3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/core/coroutines.nom b/lib/core/coroutines.nom
index a11d6ee..3102d70 100644
--- a/lib/core/coroutines.nom
+++ b/lib/core/coroutines.nom
@@ -1,5 +1,4 @@
#!/usr/bin/env nomsu -V7.0.0
-
###
This file defines the code that creates and manipulates coroutines
@@ -16,6 +15,7 @@ test:
yield 5
repeat 3 times:
yield 6
+
$nums = []
for $ in (coroutine from $fn): $nums, add $
assume ($nums == [4, 5, 6, 6, 6])
@@ -27,6 +27,7 @@ test:
$d.x += 1
yield
$d.x += 1
+
repeat while ((coroutine status of $co) != "dead"): resume $co
assume $d.x == 3
$(co) = (coroutine: yield 5)