Slice

object Slice

Slice companion object. Host factory methods.

Companion:
class
class Object
trait Matchable
class Any
Slice.type

Value members

Concrete methods

def apply[T](head: T, tail: T*): Slice[T]

Creates new detached Slice out of given value sequence.

Creates new detached Slice out of given value sequence.

def apply[T](mapF: Int => T): Slice[T]

Creates new unbound Slice of function of integers.

Creates new unbound Slice of function of integers.

def apply[T](mapF: Int => T, from: Int, to: Int): Slice[T]

Creates new bounded Slice of function of a range of integers.

Creates new bounded Slice of function of a range of integers.

def empty[T]: Slice[T]

Creates an empty Slice of given type.

Creates an empty Slice of given type.

def of[T](array: Array[T]): Slice[T]

Creates new Slice of given array values.

Creates new Slice of given array values.

Note:

This DOES NOT make a copy, any changes to the underlying array will directly affect the slice output. For full immutability does not share array reference with other components.

def of[T](array: Array[T], from: Int, to: Int): Slice[T]

Creates new Slice of given subset of array values.

Creates new Slice of given subset of array values.