}
# function with prototype
- fun mymap($fun, @args) :(&@) {
+ fun mymap($fun, @args)
+ :(&@)
+ {
my @res;
for (@args) {
push @res, $fun->($_);
(subroutine name, parameter list, default arguments, prototype, default
attributes, attributes, argument count checks, and implicit C<$self>):
- method foo($x, $y, $z = sqrt 5) :($$$;$) :lvalue :Banana(2 + 2) {
+ method foo($x, $y, $z = sqrt 5)
+ :($$$;$)
+ :lvalue
+ :Banana(2 + 2)
+ {
...
}
Another example:
- my $coderef = fun ($p, $q) :(;$$)
+ my $coderef = fun ($p, $q)
+ :(;$$)
:lvalue
:Gazebo((>:O)) {
...