ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/eg/cont
(Generate patch)

Comparing Coro/eg/cont (file contents):
Revision 1.1 by root, Sat Jul 14 22:14:21 2001 UTC vs.
Revision 1.2 by root, Thu Jul 19 02:45:09 2001 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines