O1Library Docs
Fall 2023
Docs API

# seq

o1.util.nice$.seq$
object seq

Provides nice extensions to the interface of `scala.Seq`, for convenience.

## Attributes

Graph
Supertypes
  class Object
  trait Matchable
  class Any
Self type
  seq.type

## Members list

### Extensions

extension [Element](self: Seq[Element])(self: Seq[Element])
def randomElement(): Element

Return a random element from the collection. Uses the standard `scala.util.Random` singleton.

Return a random element from the collection. Uses the standard `scala.util.Random` singleton.

## Attributes

def randomElement(randomizer: Random): Element

Return a random element from the collection. Uses the given `Random` instance.

Return a random element from the collection. Uses the given `Random` instance.

## Attributes