Pick random element: Difference between revisions
Content deleted Content added
Add Seed7 example |
|||
Line 139: | Line 139: | ||
<lang ruby>irb(main):001:0> %w(north east south west).choice |
<lang ruby>irb(main):001:0> %w(north east south west).choice |
||
=> "south"</lang> |
=> "south"</lang> |
||
=={{header|Seed7}}== |
|||
<lang seed7>$ include "seed7_05.s7i"; |
|||
const proc: main is func |
|||
begin |
|||
writeln(rand([] ("foo", "bar", "baz"))); |
|||
end func;</lang> |
|||
=={{header|Smalltalk}}== |
=={{header|Smalltalk}}== |