1 | #!/usr/bin/perl | 1 | #!/usr/bin/perl |
---|---|---|---|
2 | 2 | ||
3 | use Coro; | ||
3 | use Coro::Cont; | 4 | use Coro::Cont; |
4 | 5 | ||
5 | my $cont = cont { | 6 | sub mul23 : Cont { |
6 | result $_*2; | 7 | result shift*2; |
7 | result $_*3; | 8 | result shift*3; |
8 | }; | 9 | } |
9 | 10 | ||
10 | my %hash = (1,1,2,2,3,3); | 11 | my %hash = (1,1,2,2,3,3); |
11 | 12 | ||
12 | %hash = map &$cont, %hash; | 13 | %hash = map &$cont, %hash; |
13 | 14 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |