Pick random element: Difference between revisions

Content added Content deleted
(Updated to work with Nim 1.4: replaced "ls.rand()" with "sample(ls)". Added missing "import random" statement.)
(Added Arturo implementation)
Line 108: Line 108:
{{out}}
{{out}}
<pre>"two"</pre>
<pre>"two"</pre>

=={{header|Arturo}}==

<lang rebol>fruit: ["apple" "banana" "pineapple" "apricot" "watermelon"]

print sample fruit</lang>

{{out}}

<pre>pineapple</pre>


=={{header|AutoHotkey}}==
=={{header|AutoHotkey}}==