Beginner in coroutines, sorry.
Is there a rationale, why yield call takes one argument and yieldto
takes multiple arguments?
proc cp {} {
puts "<[yield y1]>"
puts "<[yieldto string cat y2]>"
return
}
% coroutine ct cp
y1
% ct "in 1"
<in 1>
y2
% ct "in 2" "in 3"
<{in 2} {in 3}>
On the outside (e.g. usage side) of the coroutine, I find this quite strange, that once, only one argument is permitted, while otherwise,
there are multiple arguments. Why isn't this the same for yield and
yieldto?
Thanks for all,
Harald
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,075 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 100:22:53 |
| Calls: | 13,798 |
| Calls today: | 1 |
| Files: | 186,990 |
| D/L today: |
8,318 files (2,339M bytes) |
| Messages: | 2,438,700 |