… | … | ||
---|---|---|---|
2 | 2 | ||
3 | use Coro; | 3 | use Coro; |
4 | use Coro::Cont; | 4 | use Coro::Cont; |
5 | 5 | ||
6 | sub mul23 : Cont { | 6 | sub mul23 : Cont { |
7 | result shift*2; | 7 | result 2*shift; |
8 | result shift*3; | 8 | result 3*shift; |
9 | } | 9 | } |
10 | 10 | ||
11 | my %hash = (1,1,2,2,3,3); | 11 | my %hash = (1,10,2,20,3,30); |
12 | 12 | ||
13 | %hash = map &$cont, %hash; | 13 | %hash = map mul23($_), %hash; |
14 | 14 | ||
15 | print join(",", %hash), "\n"; | 15 | print join(",", %hash), "\n"; |
16 | 16 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |