Pick random element: Difference between revisions
Content deleted Content added
No edit summary |
|||
Line 417:
list[5] == 78
list[3] == 450</pre>
Alternate Solution:
<lang groovy>
[25, 30, 1, 450, 3, 78].sort{new Random()}?.take(1)[0]
</lang>
=={{header|Haskell}}==
|