Pick random element: Difference between revisions
Content deleted Content added
m →{{header|R}}: Fix </lang> tag. |
Added NetLogo section |
||
Line 200: | Line 200: | ||
<lang Matlab> list = 1:1000; |
<lang Matlab> list = 1:1000; |
||
list(ceil(rand(1)*length(list)))</lang> |
list(ceil(rand(1)*length(list)))</lang> |
||
=={{header|NetLogo}}== |
|||
<lang NetLogo>;; from list containnig only literals and literal constants |
|||
user-message one-of [ 1 3 "rooster" blue ] |
|||
;; from list containing variables and reporters |
|||
user-message one-of (list (red + 2) turtles (patch 0 0) ) |
|||
</lang> |
|||
=={{header|OCaml}}== |
=={{header|OCaml}}== |