Multiple distinct objects: Difference between revisions

added RPL
m (→‎{{header|Wren}}: Changed to Wren S/H)
(added RPL)
Line 1,325:
say words(randoms) ' unique numbers generated.' /*stick a fork in it, we're all done. */</syntaxhighlight>
<br><br>
 
=={{header|RPL}}==
{{works with|HP|49}}
To create a list of n references to the same object:
<span style="color:blue">FOO</span> n DUPN →LIST
To create a list of n distinct objects:
« <span style="color:blue">FOO</span> » 'X' 1 n 1 SEQ
The FOO function can access the rank at which the object will be stored by reading the X variable.
 
=={{header|Ruby}}==
1,150

edits