Append numbers at same position in strings: Difference between revisions

m
→‎{{header|Raku}}: Updated for changed task requirements. Add some other similar manipulations.
m (syntax highlighting fixup automation)
m (→‎{{header|Raku}}: Updated for changed task requirements. Add some other similar manipulations.)
Line 445:
 
=={{header|Raku}}==
Various manipulations.
Not really seeing why we need to show the result twice but that's what the requirement is... ¯\_(ツ)_/¯ (I find myself making that gesture often in response to Calmosofts tasks.)
<syntaxhighlight lang=perl6>my @lists = 1..9, 10..18, 19..27;
 
put [Z~] @lists; # the task
<syntaxhighlight lang=perl6>say [[Z~] [1,2,3,4,5,6,7,8,9], [10,11,12,13,14,15,16,17,18], [19,20,21,22,23,24,25,26,27]] xx 2;</syntaxhighlight>
put [Z~] @lists».flip; # each component reversed
put [RZ~] @lists; # in reversed order
put ([Z~] @lists)».flip; # reversed components in reverse order</syntaxhighlight>
{{out}}
<pre>([11019 21120 31221 41322 51423 61524 71625 81726 91827] [11019 21120 31221 41322 51423 61524 71625 81726 91827])</pre>
10191 21102 32112 43122 54132 65142 76152 87162 98172
19101 20112 21123 22134 23145 24156 25167 26178 27189
91011 02112 12213 22314 32415 42516 52617 62718 72819</pre>
 
=={{header|Ring}}==
10,327

edits