Anonymous user
Pick random element: Difference between revisions
Updated to work with Nim 1.4: replaced "ls.rand()" with "sample(ls)". Added missing "import random" statement.
m (added whitespace before the TOC. .) |
(Updated to work with Nim 1.4: replaced "ls.rand()" with "sample(ls)". Added missing "import random" statement.) |
||
Line 812:
=={{header|Nim}}==
<lang nim>
randomize()
let ls = @["foo", "bar", "baz"]
echo
=={{header|Objeck}}==
|