Append numbers at same position in strings: Difference between revisions
Append numbers at same position in strings (view source)
Revision as of 11:07, 26 August 2022
, 1 year ago→{{header|Raku}}: Updated for changed task requirements. Add some other similar manipulations.
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: Updated for changed task requirements. Add some other similar manipulations.) |
||
Line 445:
=={{header|Raku}}==
Various manipulations.
<syntaxhighlight lang=perl6>my @lists = 1..9, 10..18, 19..27;
put [Z~] @lists; # the task
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>
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}}==
|