Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
27 lines (17 sloc) 478 Bytes
use v6;
use Test;
plan 6;
# L<S06/Slurpy block/>
sub foo (Code *$block) {
return $block.();
}
is(foo():{ "foo" }, 'foo', 'Code *$block - 1');
is(foo():{ 0 }, 0, 'Code *$block - 2');
sub bar (*&block) {
return &block.();
}
is(bar():{ "bar" }, 'bar', '*&block - 1');
is(bar():{ 0 }, 0, '*&block - 2');
is(foo():{ "foo" }, bar():{ "foo" }, 'Code *$block == *&block - 1');
is(foo():{ 0 }, bar():{ 0 }, 'Code *$block == *&block - 2');
# vim: expandtab shiftwidth=4
You can’t perform that action at this time.