Jump to content

Partial function application: Difference between revisions

m
→‎{{header|Raku}}: Fix-up some Perl6 -> Raku references
m (→‎{{header|Raku}}: Fix-up some Perl6 -> Raku references)
Line 1,927:
(4 8 12 16)
(4 16 36 64)</pre>
The <tt>*+2</tt> is also a form of partial application in Perl&nbsp;6Raku. In this case we partially apply the <tt>infix:<+></tt> function with a second argument of 2. That is, the star (known as the "whatever" star) indicates which argument <em>not</em> to apply. In contrast to languages that keep some arguments unbound by leaving holes, the explicit star in Perl&nbsp;6Raku allows us to avoid syntactic ambiguity in whether to expect a term or an infix operator; such self-clocking code contributes to better error messages when things go wrong.
 
=={{header|REXX}}==
10,339

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.