Pick random element: Difference between revisions
Content deleted Content added
Line 472: | Line 472: | ||
paste(sample(letters, 10, rep=T), collapse="") |
paste(sample(letters, 10, rep=T), collapse="") |
||
# [1] "episxgcgmt"</lang> |
# [1] "episxgcgmt"</lang> |
||
=={{header|Racket}}== |
|||
<lang Racket> |
|||
#lang racket |
|||
(define (pick-item l) |
|||
(list-ref l (random (length l)))) |
|||
</lang> |
|||
=={{header|REXX}}== |
=={{header|REXX}}== |