Changeset 2f19e03 for tests/coroutine/fibonacci.cfa
- Timestamp:
- Jun 15, 2021, 12:28:48 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b51e389c
- Parents:
- 4aba055 (diff), 4f1b8f3f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/coroutine/fibonacci.cfa
r4aba055 r2f19e03 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.