EvidenceIterableFactory

trait EvidenceIterableFactory[+CC[_], Ev[_]] extends Serializable

Base trait for companion objects of collections that require an implicit evidence.

Base trait for companion objects of collections that require an implicit evidence.

Type Params
CC

Collection type constructor (e.g. ArraySeq)

Ev

Unary type constructor for the implicit evidence required for an element type (typically Ordering or ClassTag)

Companion
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def empty[A](`evidence$16`: Ev[A]): CC[A]
def from[E](it: IterableOnce[E])(`evidence$15`: Ev[E]): CC[E]
def newBuilder[A](`evidence$22`: Ev[A]): Builder[A, CC[A]]

Concrete methods

def apply[A](xs: A*)(`evidence$17`: Ev[A]): CC[A]
def fill[A](n: Int)(elem: => A)(`evidence$18`: Ev[A]): CC[A]

Produces a collection containing the results of some element computation a number of times.

Produces a collection containing the results of some element computation a number of times.

Value Params
elem

the element computation

n

the number of elements contained in the collection.

Returns

A collection that contains the results of n evaluations of elem.

def iterate[A](start: A, len: Int)(f: A => A)(`evidence$20`: Ev[A]): CC[A]

Produces a collection containing repeated applications of a function to a start value.

Produces a collection containing repeated applications of a function to a start value.

Value Params
f

the function that's repeatedly applied

len

the number of elements contained in the collection

start

the start value of the collection

Returns

a collection with len values in the sequence start, f(start), f(f(start)), ...

def tabulate[A](n: Int)(f: Int => A)(`evidence$19`: Ev[A]): CC[A]

Produces a collection containing values of a given function over a range of integer values starting from 0.

Produces a collection containing values of a given function over a range of integer values starting from 0.

Value Params
f

The function computing element values

n

The number of elements in the collection

Returns

A collection consisting of elements f(0), ..., f(n -1)

def unfold[A, S](init: S)(f: S => Option[(A, S)])(`evidence$21`: Ev[A]): CC[A]

Produces a collection that uses a function f to produce elements of type A and update an internal state of type S.

Produces a collection that uses a function f to produce elements of type A and update an internal state of type S.

Type Params
A

Type of the elements

S

Type of the internal state

Value Params
f

Computes the next element (or returns None to signal the end of the collection)

init

State initial value

Returns

a collection that produces elements using f until f returns None

Implicits

Implicits

implicit def evidenceIterableFactory[A](`evidence$23`: Ev[A]): Factory[A, CC[A]]