nitlanguage
/
nit.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
abstract_compiler: Multi threaded and dynamic `do catch` mecanism
[nit.git]
/
examples
/
rosettacode
/
pick_random.nit
1
#!/usr/bin/env nit
2
#
3
# This file is part of NIT ( http://www.nitlanguage.org ).
4
# This program is public domain
5
6
# Task: Pick random element
7
#
8
# SEE: http://rosettacode.org/wiki/Pick_random_element
9
10
var
array
= [
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
]
11
print array
.
rand