FoldExtensions

turbolift.internals.extensions.FoldExtensions

No need to use this trait directly, because it's inherited by Extensions object.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Extensions

Members list

Extensions

Extensions

extension [A, S <: (IterableOnce)](thiz: S[A])
def foldLeftEff[U, B](z: B)(op: (B, A) => Computation[B, U]): Computation[B, U]

Like foldLeft from the standard library, but using effectful function.

Like foldLeft from the standard library, but using effectful function.

Attributes

def foldRightEff[U, B](z: B)(op: (A, B) => Computation[B, U]): Computation[B, U]

Like foldRight from the standard library, but using effectful function.

Like foldRight from the standard library, but using effectful function.

Attributes

def reduceLeftEff[U](op: (A, A) => Computation[A, U]): Computation[A, U]

Like reduceLeft from the standard library, but using effectful function.

Like reduceLeft from the standard library, but using effectful function.

Attributes

def reduceLeftOptionEff[U](op: (A, A) => Computation[A, U]): Computation[Option[A], U]

Like reduceLeftOption from the standard library, but using effectful function.

Like reduceLeftOption from the standard library, but using effectful function.

Attributes

extension [A, S <: (Iterable)](thiz: S[A])
def mapFoldEff[B, U](f: A => Computation[B, U])(z: B)(op: (B, B) => B): Computation[B, U]
def mapReduceEff[B, U](f: A => Computation[B, U])(op: (B, B) => B): Computation[B, U]

mapEff fused with reduceEff.

mapEff fused with reduceEff.

Attributes

def mapReduceOptionEff[B, U](f: A => Computation[B, U])(op: (B, B) => B): Computation[Option[B], U]

mapEff fused with reduceOptionEff.

mapEff fused with reduceOptionEff.

Attributes

def reduceEff[U](op: (A, A) => Computation[A, U]): Computation[A, U]

Like reduce from the standard library, but using effectful function.

Like reduce from the standard library, but using effectful function.

Attributes

def reduceOptionEff[U](op: (A, A) => Computation[A, U]): Computation[Option[A], U]

Like reduceOption from the standard library, but using effectful function.

Like reduceOption from the standard library, but using effectful function.

Attributes

def reduceRightEff[U](op: (A, A) => Computation[A, U]): Computation[A, U]

Like reduceRight from the standard library, but using effectful function.

Like reduceRight from the standard library, but using effectful function.

Attributes

def reduceRightOptionEff[U](op: (A, A) => Computation[A, U]): Computation[Option[A], U]

Like reduceRightOption from the standard library, but using effectful function.

Like reduceRightOption from the standard library, but using effectful function.

Attributes