Pick randomly
rand x rand[x]
Where x is a list returns one item chosen randomly from x
q)rand 1 30 45 32
32
q)rand("abc";"def";"ghi") / list of lists
"ghi"
Where x is an atom returns an atom of the same type.
q)rand 100
10
q)rand each 20#6 /roll twenty 6-sided dice
2 5 4 5 1 0 5 2 4 5 1 2 0 1 1 2 1 0 0 5
q)rand 3.14159
1.277572
q)rand 2012.09.12
2008.02.04
q)rand `3
`afe