LList

libretto.CoreLib.LList$
object LList

Attributes

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

Members list

Concise view

Value members

Concrete methods

def actOn[S, A](act: S |*| A -⚬ S): S |*| LList[A] -⚬ S
def collect[T, U](f: T -⚬ Maybe[U]): LList[T] -⚬ LList[U]
def concat[T]: LList[T] |*| LList[T] -⚬ LList[T]
def cons[T]: T |*| LList[T] -⚬ LList[T]
def consMaybe[T]: Maybe[T] |*| LList[T] -⚬ LList[T]
def fold[T](implicit T: Monoid[T]): LList[T] -⚬ T
def fold0[T](implicit T: Semigroup[T]): LList[T] -⚬ Maybe[T]
def foldL[S, T](f: S |*| T -⚬ S): S |*| LList[T] -⚬ S
def foldMap[T, U](f: T -⚬ U)(implicit U: Monoid[U]): LList[T] -⚬ U
def foldMap0[T, U](f: T -⚬ U)(implicit U: Semigroup[U]): LList[T] -⚬ Maybe[U]
def fromList[S, T](fs: List[S -⚬ T])(using S: Comonoid[S]): S -⚬ LList[T]
def fromList0[S, T](fs: List[S -⚬ T])(using S: Cosemigroup[S]): S -⚬ S |*| LList[T]
def fromListU[S, T](fs: List[S -⚬ T]): Unlimited[S] -⚬ LList[T]
def halfRotateL[A, B]: LList[A |*| B] -⚬ LList[B |*| A]

Shifts all the elements of a list by "half" to the left, moving the first half of the first element to the end of the list.

Shifts all the elements of a list by "half" to the left, moving the first half of the first element to the end of the list.

Example:

Before:

(a1, b1), (a2, b2), (a3, b3)

After:

(b1, a2), (b2, a3), (b3, a1)

Attributes

Inserts an element to a list as soon as the element signals. If m elements of the input list become available before the new element signals, the new element will appear as the (m+1)-th element in the output list. Note: The m elements from the input list are not awaited to signal; their timely appearence in the input list is sufficient for them to come before the inserted element.

Inserts an element to a list as soon as the element signals. If m elements of the input list become available before the new element signals, the new element will appear as the (m+1)-th element in the output list. Note: The m elements from the input list are not awaited to signal; their timely appearence in the input list is sufficient for them to come before the inserted element.

Attributes

def map[T, U](f: T -⚬ U): LList[T] -⚬ LList[U]
def mapS[S, T, U](f: S |*| T -⚬ S |*| U): S |*| LList[T] -⚬ S |*| LList[U]
def mapSAppend[S, T, U](f: S |*| T -⚬ S |*| U, tail: S -⚬ LList[U]): S |*| LList[T] -⚬ LList[U]
def merge[T]: LList[T] |*| LList[T] -⚬ LList[T]

Merges the two lists as they unfold, i.e. as soon as the next element becomes available in one of the lists, it also becomes available as the next element of the result list.

Merges the two lists as they unfold, i.e. as soon as the next element becomes available in one of the lists, it also becomes available as the next element of the result list.

Attributes

def nil[T]: One -⚬ LList[T]
def of[S, T](fs: S -⚬ T*)(using S: Comonoid[S]): S -⚬ LList[T]
def singleton[T]: T -⚬ LList[T]
def singletonOnSignal[T](using T: Positive[T]): T -⚬ LList[T]

Creates a singleton list that will appear as undecided (between nil and cons) until the element signals.

Creates a singleton list that will appear as undecided (between nil and cons) until the element signals.

Attributes

Make the elements of the input list available in the output list in the order in which they signal.

Make the elements of the input list available in the output list in the order in which they signal.

Attributes

def switch[T, R](caseNil: One -⚬ R, caseCons: T |*| LList[T] -⚬ R): LList[T] -⚬ R
def switchWithL[A, T, R](caseNil: A -⚬ R, caseCons: A |*| T |*| LList[T] -⚬ R): A |*| LList[T] -⚬ R
def switchWithR[A, T, R](caseNil: A -⚬ R, caseCons: T |*| LList[T] |*| A -⚬ R): LList[T] |*| A -⚬ R
def transform[T, A, U](f: A |*| T -⚬ U)(implicit A: Comonoid[A]): A |*| LList[T] -⚬ LList[U]
def transformCollect[T, A, U](f: A |*| T -⚬ Maybe[U])(implicit A: Comonoid[A]): A |*| LList[T] -⚬ LList[U]
def uncons[T]: LList[T] -⚬ Maybe[T |*| LList[T]]
def unzip[A, B]: LList[A |*| B] -⚬ LList[A] |*| LList[B]

Implicits

Implicits

implicit def monoidLList[A]: Monoid[LList[A]]
implicit def signalingLList[T]: Positive[LList[T]]

Signals when it is decided whether the list is empty (nil) or has an element (cons).

Signals when it is decided whether the list is empty (nil) or has an element (cons).

Attributes