langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
13
Task/Call-a-function/Perl-6/call-a-function-3.pl6
Normal file
13
Task/Call-a-function/Perl-6/call-a-function-3.pl6
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
foo 1,2 # as list operator
|
||||
foo(1,2) # as named function
|
||||
foo.(1,2) # as named function, explicit postfix
|
||||
$ref(1,2) # as object invocation (must be hard ref)
|
||||
$ref.(1,2) # as object invocation, explicit postfix
|
||||
1.$foo: 2 # as pseudo-method meaning $foo(1,2) (hard ref only)
|
||||
1.$foo(2) # as pseudo-method meaning $foo(1,2) (hard ref only)
|
||||
1.&foo: 2 # as pseudo-method meaning &foo(1,2) (is hard foo)
|
||||
1.&foo(2) # as pseudo-method meaning &foo(1,2) (is hard foo)
|
||||
1.foo: 2 # as method via dispatcher
|
||||
1.foo(2) # as method via dispatcher
|
||||
1."$name"(2) # as method via dispatcher, symbolic
|
||||
1 + 2 # as operator to infix:<+> function
|
||||
Loading…
Add table
Add a link
Reference in a new issue