random_select

sefun
SYNOPSIS
    mixed  random_select (mixed * list)
    mixed  random_select (mapping list)
    string random_select (string list)

DESCRIPTION
    Randomly select one element from the argument <list> and return
    it.
    If <list> is an array or array, the result is one of its elements.
    If <list> is a string, the result is a string with one of the
    characters from <list>.

EXAMPLE
    random_select( ({ 1, 2 }) )                  --> returns 1 or 2
    random_select( ([ "foo":1;2, "bar":3;4 ]) )  --> returns 1 or 3
    random_select( "ab" )                        --> returns "a" or "b"

SEE ALSO