AsyncList

cps.stream.AsyncList
See theAsyncList companion object
sealed trait AsyncList[F[_], +T]

Mininal async stream.

Attributes

Companion
object
Source
AsyncList.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Cons[F, T]
class Empty[F]
class Wait[F, T]

Members list

Value members

Abstract methods

def append[S >: T](x: => AsyncList[F, S]): AsyncList[F, S]

Append another stream to this stream.

Append another stream to this stream.

Type parameters

S

type of result

Value parameters

x

stream to append

Attributes

Returns

new stream wich at first have this elements, then appended elements

Source
AsyncList.scala
def filter(p: T => Boolean): AsyncList[F, T]

filter elements of stream

filter elements of stream

Value parameters

p
  • predicate to filter

Attributes

Returns
  • new stream with filtered elements, which contains only elements, for which p is true.
Source
AsyncList.scala
def filterAsync(p: T => F[Boolean]): AsyncList[F, T]

filter async function over stream elements. This function is automatically substiuted instead of filter in async macro, if p include awaits

filter async function over stream elements. This function is automatically substiuted instead of filter in async macro, if p include awaits

Attributes

Source
AsyncList.scala
def find(p: T => Boolean): F[Option[T]]

Attributes

Source
AsyncList.scala
def findAsync(p: (T) => F[Boolean]): F[Option[T]]

Attributes

Source
AsyncList.scala
def flatMap[S](f: T => AsyncList[F, S]): AsyncList[F, S]

FlatMap function over stream elements.

FlatMap function over stream elements.

Type parameters

S

type of result

Value parameters

f

function to flatMap

Attributes

Returns

new stream with mapped elements

Source
AsyncList.scala
def flatMapAsync[S](f: T => F[AsyncList[F, S]]): AsyncList[F, S]

FlatMap async function over stream elements. This function is automatically substiuted instead of flatMap in async macro, if f include awaits

FlatMap async function over stream elements. This function is automatically substiuted instead of flatMap in async macro, if f include awaits

Type parameters

S

type of result

Value parameters

f

function to flatMap

Attributes

Returns

new stream with mapped elements

Source
AsyncList.scala
def fold[S](s0: S)(f: (S, T) => S): F[S]

Fold function over stream elements.

Fold function over stream elements.

Type parameters

S

type of result

Value parameters

f

function to fold

s0

initial value

Attributes

Returns

accumulated folded value (i.e. f(f(f(s0, t1), t2), t3) ...) )

Source
AsyncList.scala
def foldAsync[S](s0: S)(f: (S, T) => F[S]): F[S]

Fold async function over stream elements. This function is automatically substiuted instead of fold in async macro, if f include awaits

Fold async function over stream elements. This function is automatically substiuted instead of fold in async macro, if f include awaits

Type parameters

S

type of result

Value parameters

f

function to fold

s0

initial value

Attributes

Returns

accumulated folded value (i.e. f(f(f(s0, t1), t2), t3) ...) )

Source
AsyncList.scala
def map[S](f: T => S): AsyncList[F, S]

Map function over stream elements.

Map function over stream elements.

Type parameters

S

type of result

Value parameters

f

function to map

Attributes

Returns

new stream with mapped elements

Source
AsyncList.scala
def mapAsync[S](f: T => F[S]): AsyncList[F, S]

Map async function over stream elements. * @param f function to map

Map async function over stream elements. * @param f function to map

Type parameters

S

type of result

Attributes

Returns

new stream with mapped elements

Source
AsyncList.scala
infix def merge[S >: T](other: AsyncList[F, S]): AsyncList[F, S]

Attributes

Source
AsyncList.scala
def next: F[Option[(T, AsyncList[F, T])]]

Get next element of stream

Get next element of stream

Attributes

Returns

Some((T, AsyncList[F,T])) or None if end of stream

Source
AsyncList.scala
def scanTail[S](s0: S)(f: (S, T) => S): AsyncList[F, S]

Attributes

Source
AsyncList.scala
def scanTailAsync[S](s0: S)(f: (S, T) => F[S]): AsyncList[F, S]

Attributes

Source
AsyncList.scala
def skip(n: Int): AsyncList[F, T]

Attributes

Source
AsyncList.scala
def takeTo[B <: Growable[T]](buffer: B, n: Int): F[B]

Attributes

Source
AsyncList.scala

Concrete methods

infix def ><[S >: T](other: AsyncList[F, S]): AsyncList[F, S]

alias for merge

alias for merge

Attributes

Source
AsyncList.scala
def appendAsync[S >: T](x: () => F[AsyncList[F, S]]): AsyncList[F, S]

Append async function over stream elements. This function is automatically substiuted instead of append in async macro, if f include awaits

Append async function over stream elements. This function is automatically substiuted instead of append in async macro, if f include awaits

Type parameters

S

type of result

Value parameters

x

function to append

Attributes

Returns

new stream wich at first have this elements, then appended elements

Source
AsyncList.scala
def foreach[U](f: T => U): F[Unit]

Apply f for each element pf the stream

Apply f for each element pf the stream

Attributes

Source
AsyncList.scala
def foreachAsync[U](f: T => F[U]): F[Unit]

Attributes

Source
AsyncList.scala
def iterator(using ExecutionContext): AsyncIterator[F, T]

Attributes

Source
AsyncList.scala
def scan[S](s0: S)(f: (S, T) => S): AsyncList[F, S]

Attributes

Source
AsyncList.scala
def scanAsync[S](s0: S)(f: (S, T) => F[S]): AsyncList[F, S]

Attributes

Source
AsyncList.scala
def take[CC[_]](n: Int)(using Factory[T, CC[T]]): F[CC[T]]

Attributes

Source
AsyncList.scala
def takeAll[CC[_]](n: Int)(using Factory[T, CC[T]]): F[CC[T]]

Attributes

Source
AsyncList.scala
def takeList(n: Int): F[List[T]]

Attributes

Source
AsyncList.scala
def takeListAll(): F[List[T]]

Attributes

Source
AsyncList.scala