Overloaded operators: Difference between revisions

m
→‎{{header|Raku}}: further exposition
m (→‎{{header|Raku}}: Final word)
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
10,327

edits