function printNums(start, end) { var i = start; while (i < end + 1) { print(i); yield; i = i + 1; } } spawn printNums(1, 4); printNums(11, 16);