First-class functions: Difference between revisions

(→‎{{header|Raku}}: The composition operator is built in raku)
(→‎{{header|Raku}}: corrections)
Line 2,609:
 
say .(.5) for 𝐴 Z∘ 𝐵</syntaxhighlight>
 
Output:
{{output}}
<pre>0.5
0.4999999999999999
0.5
0.5000000000000001
0.5</pre>
 
It is not clear why we don't get exactly 0.5, here.
 
Operators, both buildinbuiltin and user-defined, are first class too.
 
<syntaxhighlight lang="raku" line>my @a = 1,2,3;
1,934

edits