Endless

libretto.CoreLib.Endless
object Endless

Attributes

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

Members list

Value members

Concrete methods

def close[A]: Endless[A] -⚬ One
def create[X, A](onClose: X -⚬ One, onPull: X -⚬ A |*| Endless[A]): X -⚬ Endless[A]
def createWith[X, A, Y](onClose: X -⚬ Y, onPull: X -⚬ A |*| Endless[A] |*| Y): X -⚬ Endless[A] |*| Y
def foldLeftSequentially[B, A](f: B |*| A -⚬ B)(using Positive[B]): B |*| Endless[A] -⚬ B
def foldMapSequentially[A, B](f: A -⚬ B)(using Positive[B], Semigroup[B]): Endless[A] -⚬ B
def groupMap[A, B](groupSize: Int, f: LList1[A] -⚬ B): Endless[A] -⚬ Endless[B]
def groups[A](groupSize: Int): Endless[A] -⚬ Endless[LList1[A]]
def map[A, B](f: A -⚬ B): Endless[A] -⚬ Endless[B]
def mapSequence[A, B](f: A -⚬ Ping |*| B): Endless[A] -⚬ Endless[B]

Delays each next pull until the Ping produced from the previous element.

Delays each next pull until the Ping produced from the previous element.

Attributes

def mapSequentially[A, B](f: A -⚬ B)(using Positive[B]): Endless[A] -⚬ Endless[B]
def mergeEitherPreferred[A, B](using A: Positive[A], B: Positive[B], affA: Affine[A], affB: Affine[B]): Endless[A] |*| Endless[B] -⚬ Endless[A |+| B]
def mergePreferred[A](using A: Positive[A], aff: Affine[A]): Endless[A] |*| Endless[A] -⚬ Endless[A]
def poolBy[A : Positive, Ā](lInvert: One -⚬ Ā |*| A): LList1[A] -⚬ Endless[A |*| Ā] |*| LList1[A]
def pull[A]: Endless[A] -⚬ A |*| Endless[A]
def pullN[A](n: Int): Endless[A] -⚬ LList1[A] |*| Endless[A]
def sequence[A](using A: Positive[A]): Endless[A] -⚬ Endless[A]

Delays each next pull until the previously emitted element signalled.

Delays each next pull until the previously emitted element signalled.

Attributes

def split[A]: Endless[A] -⚬ Endless[A] |*| Endless[A]
def take[A](n: Int): Endless[A] -⚬ LList[A]

Pulls the given amount of elements and returns them in a list.

Pulls the given amount of elements and returns them in a list.

Note: This method assembles a program whose size is proportional to n.

Attributes

def toChoice[A]: Endless[A] -⚬ One |&| A |*| Endless[A]
def unfold[S, A](f: S -⚬ A |*| S): S -⚬ Endless[A] |*| S
def unpull[A](using A: Affine[A]): A |*| Endless[A] -⚬ Endless[A]

Givens

Givens

given given_Comonoid_Endless[A]: given_Comonoid_Endless[A]

Signals when the consumer makes a choice, i.e. close or pull.

Signals when the consumer makes a choice, i.e. close or pull.

Attributes