diff options
Diffstat (limited to 'core/coroutines.nom')
| -rw-r--r-- | core/coroutines.nom | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/coroutines.nom b/core/coroutines.nom index 27797fa..7d17d63 100644 --- a/core/coroutines.nom +++ b/core/coroutines.nom @@ -1,7 +1,7 @@ -#!/usr/bin/env nomsu -V4.8.10 +#!/usr/bin/env nomsu -V4.10.12.7 # This file defines the code that creates and manipulates coroutines - + use "core/metaprogramming.nom" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -14,8 +14,11 @@ test: -> 5 repeat 3 times: -> 6 - for % in coroutine %co: %nums::add % + for % in coroutine %co: + %nums::add % + assume (%nums == [4, 5, 6, 6, 6]) or barf "Coroutine iteration failed" + [coroutine %body, generator %body] all compile to "\ ..(function() \(%body as lua) |
