Overloaded operators: Difference between revisions
m
→{{header|Raku}}: further exposition
Thundergnat (talk | contribs) m (→{{header|Raku}}: Final word) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: further exposition) |
||
Line 117:
say (2, 3, 4) + [5, 6]; # List plus Array</lang>
+ is a numeric operator so every thing is evaluated numerically if possible
{{out}}
<pre>8
Line 136 ⟶ 137:
say (2, 3, 4) ~ [5, 6]; # List concatenate Array</lang>
~ is a Stringy operator so everything is evaluated as a string (numerics are evaluated numerically then coerced to a string).
{{out}}
<pre>35
|