Array concatenation: Difference between revisions

Content deleted Content added
JDDev0 (talk | contribs)
Add lang example
Aerobar (talk | contribs)
Line 3,737: Line 3,737:


=={{header|RPL}}==
=={{header|RPL}}==
In RPL, what is called arrays are actually vectors. Sets of numbers can be stored either in such data structures or in lists, depending on the planned use. Vectors are great for arithmetics, but lists are more versatile.
{{works with|Halcyon Calc|4.2.7}}
{{works with|Halcyon Calc|4.2.7}}
=== Vector concatenation===
≪ SWAP ARRY→ LIST→ DROP → n
≪ SWAP ARRY→ LIST→ DROP → n
≪ n 1 + ROLL ARRY→ LIST→ DROP
≪ n 1 + ROLL ARRY→ LIST→ DROP
Line 3,748: Line 3,750:
<pre>
<pre>
1: [1 2 3 4 5]
1: [1 2 3 4 5]
</pre>
=== List concatenation===
No need for a program to do that:
{1 2 3} {4 5} +
{{out}}
<pre>
1: {1 2 3 4 5}
</pre>
</pre>