Changeset 5c46672
- Timestamp:
- Jun 14, 2021, 2:48:44 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 733fd3d
- Parents:
- d363634
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/coroutine/fibonacci.cfa
rd363634 r5c46672 31 31 } 32 32 33 int next( Fibonacci & fib ) with( fib ) {34 resume( fib ); // restart last suspend35 return fn;36 }37 38 33 int main() { 39 34 Fibonacci f1, f2; 40 35 for ( 10 ) { // print N Fibonacci values 41 sout | next( f1 ) | next( f2 );36 sout | resume( f1 ).fn | resume( f2 ).fn; 42 37 } // for 43 38 }
Note: See TracChangeset
for help on using the changeset viewer.