Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (17 sloc) 0.464 kB
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: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.