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-2.pl6
Normal file
13
Task/Call-a-function/Perl-6/call-a-function-2.pl6
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
foo 1 # as list operator
|
||||
foo(1) # as named function
|
||||
foo.(1) # as named function, explicit postfix
|
||||
$ref(1) # as object invocation (must be hard ref)
|
||||
$ref.(1) # as object invocation, explicit postfix
|
||||
1.$foo # as pseudo-method meaning $foo(1) (hard ref only)
|
||||
1.$foo() # as pseudo-method meaning $foo(1) (hard ref only)
|
||||
1.&foo # as pseudo-method meaning &foo(1) (is hard foo)
|
||||
1.&foo() # as pseudo-method meaning &foo(1) (is hard foo)
|
||||
1.foo # as method via dispatcher
|
||||
1.foo() # as method via dispatcher
|
||||
1."$name"() # as method via dispatcher, symbolic
|
||||
+1 # as operator to prefix:<+> function
|
||||
Loading…
Add table
Add a link
Reference in a new issue