IStream

sealed abstract
class IStream[A]

A linked list with by-name head and tail, allowing some control over memory usage and evaluation of contents.

This structure is a good choice when the contents are expensive to calculate and may not all need to be evaluated, at the cost of an overhead when the contents are calculated. Typeclass instances try to defer evaluation of contents, unless it would require a full traversal of the spine, preferring lazy semantics when an evaluation choice is to be made.

Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

final
def !!(other: IStream[A]): IStream[A]
final
def !:(a: A): IStream[A]

Strict concatenation

Strict concatenation

final
def #:(a: Name[A]): IStream[A]

prepend lazily (by-name parameters do not work here)

prepend lazily (by-name parameters do not work here)

final
def :!(other: A): IStream[A]
final
def foldLeftByName[B](z: B)(f: (=> B, => A) => B): B
final
def foldRightByName[B](z: => B)(f: (=> A, => B) => B): B