Skip to content

choice

In std/random.

fn choice<T>(self: Seq<T>, *, seed: Int) : Option<T>
effectful fn choice<T>(self: Seq<T>) : Option<T>

One element of self drawn uniformly, or none where self is empty.