Gleam - v1.0.2
    Preparing search index...

    Function randomItem

    • Pick a uniformly random element from array. Throws if array is empty — guard at the call site if that's possible.

      Type Parameters

      • T

      Parameters

      • array: readonly T[]

      Returns T