LanguageExt.Core

LanguageExt.Core Effects StreamT

Contents

Sub modules

DSL
MList

record StreamT <M, A> Source #

where M : Monad<M>

Lazy sequence monad transformer

Properties

property K<M, MList<A>> runListT Source #

Get the lifted monad

property StreamT<M, A> Empty Source #

Empty stream

Methods

method StreamT<M, A> Tail () Source #

Retrieve the tail of the sequence

Parameters

returns

Stream transformer

method StreamT<M, B> Map <B> (Func<A, B> f) Source #

Map the stream

Parameters

type B

Resulting bound value type

param f

Mapping function

returns

Stream transformer

method StreamT<M, A> Pure (A value) Source #

Construct a singleton stream

Parameters

param value

Single value in the stream

returns

Stream transformer

method StreamT<M, A> LiftF <F> (K<F, A> foldable) Source #

where F : Foldable<F>

Lift any foldable into the stream

This is likely to consume the foldable structure eagerly

Parameters

param foldable

Foldable structure to lift

returns

Stream transformer

method StreamT<M, A> Lift (IAsyncEnumerable<A> stream) Source #

Lift an async-enumerable into the stream

Parameters

param stream

Sequence to lift

returns

Stream transformer

method StreamT<M, A> LiftM (IAsyncEnumerable<K<M, A>> stream) Source #

Lift an async-enumerable into the stream

Parameters

param stream

Sequence to lift

returns

Stream transformer

method StreamT<M, A> Lift (IEnumerable<A> stream) Source #

Lift an enumerable into the stream

Parameters

param stream

Sequence to lift

returns

Stream transformer

method StreamT<M, A> LiftM (IEnumerable<K<M, A>> stream) Source #

Lift an enumerable into the stream

Parameters

param stream

Sequence to lift

returns

Stream transformer

method StreamT<M, A> Lift (Seq<A> stream) Source #

Lift a (possibly lazy) sequence into the stream

Parameters

param stream

Sequence to lift

returns

Stream transformer

method StreamT<M, A> LiftM (Seq<K<M, A>> stream) Source #

Lift a (possibly lazy) sequence into the stream

Parameters

param stream

Sequence to lift

returns

Stream transformer

method StreamT<M, A> Lift (K<M, A> ma) Source #

Lift an effect into the stream

Parameters

param ma

Effect to lift

returns

Stream transformer

method StreamT<M, A> LiftIO (IO<A> ma) Source #

Lift side effect into the stream

Parameters

param ma

Side effect to lift

returns

Stream transformer

method StreamT<M, A> LiftIO (K<IO, A> ma) Source #

Lift side effect into the stream

Parameters

param ma

Side effect to lift

returns

Stream transformer

method K<M, Option<(A Head, StreamT<M, A> Tail)>> Run () Source #

Iterate the stream, returning final position.

method K<M, Unit> Iter () Source #

Iterate the stream, ignoring any result.

method K<M, Option<A>> Head () Source #

Retrieve the head of the sequence

method K<M, A> HeadUnsafe () Source #

Retrieve the head of the sequence

method StreamT<M, S> Fold <S> (S state, Func<S, A, Option<S>> f) Source #

Fold the stream itself, yielding the latest state value when the fold function returns None

Parameters

type S

State type

param state

Initial state of the fold

param f

Fold operation

returns

Stream transformer

method StreamT<M, S> FoldUntil <S> (S state, Func<S, A, S> f, Func<S, A, bool> until) Source #

Fold the stream itself, yielding values when the until predicate is true

Parameters

type S

State type

param state

Initial state of the fold

param f

Fold operation

param until

Predicate

returns

Stream transformer

method StreamT<M, S> FoldWhile <S> (S state, Func<S, A, S> f, Func<S, A, bool> @while) Source #

Fold the stream itself, yielding values when the until predicate is true

Parameters

type S

State type

param state

Initial state of the fold

param f

Fold operation

param until

Predicate

returns

Stream transformer

method K<M, S> FoldM <S> (S state, Func<S, A, K<M, S>> f) Source #

Left fold

Parameters

type S

State type

param state

Initial state

param f

Folding function

returns

Accumulate state wrapped in the StreamT inner monad

method StreamT<M, A> Combine (StreamT<M, A> second) Source #

Concatenate streams

Parameters

returns

Stream transformer

method StreamT<M, A> Combine (K<StreamT<M>, A> second) Source #

Concatenate streams

Parameters

returns

Stream transformer

method StreamT<M, A> Merge (K<StreamT<M>, A> second) Source #

Interleave the items of two streams

Parameters

param second

Other stream to merge with

returns

Stream transformer

method StreamT<M, A> Merge (K<StreamT<M>, A> second, params K<StreamT<M>, A>[] rest) Source #

Interleave the items of many streams

Parameters

param rhs

Other stream to merge with

returns

Stream transformer

method StreamT<M, (A First, B Second)> Zip <B> (K<StreamT<M>, B> second) Source #

Merge the items of two streams into pairs

Parameters

param second

Other stream to merge with

returns

Stream transformer

method StreamT<M, (A First, B Second, C Third)> Zip <B, C> ( K<StreamT<M>, B> second, K<StreamT<M>, C> third) Source #

Merge the items of two streams into 3-tuples

Parameters

param second

Second stream to merge with

param third

Third stream to merge with

returns

Stream transformer

method StreamT<M, (A First, B Second, C Third, D Fourth)> Zip <B, C, D> ( K<StreamT<M>, B> second, K<StreamT<M>, C> third, K<StreamT<M>, D> fourth) Source #

Merge the items of two streams into 4-tuples

Parameters

param second

Second stream to merge with

param third

Third stream to merge with

param fourth

Fourth stream to merge with

returns

Stream transformer

method StreamT<M, A> Filter (Func<A, bool> f) Source #

method StreamT<M, A> Where (Func<A, bool> f) Source #

method StreamT<M, B> Select <B> (Func<A, B> f) Source #

method StreamT<M, B> Bind <B> (Func<A, StreamT<M, B>> f) Source #

method StreamT<M, B> Bind <B> (Func<A, K<StreamT<M>, B>> f) Source #

method StreamT<M, B> Bind <B> (Func<A, Pure<B>> f) Source #

method StreamT<M, B> Bind <B> (Func<A, IO<B>> f) Source #

method StreamT<M, B> Bind <B> (Func<A, K<IO, B>> f) Source #

method StreamT<M, C> SelectMany <B, C> (Func<A, StreamT<M, B>> bind, Func<A, B, C> project) Source #

method StreamT<M, C> SelectMany <B, C> (Func<A, K<StreamT<M>, B>> bind, Func<A, B, C> project) Source #

method StreamT<M, C> SelectMany <B, C> (Func<A, Pure<M, B>> bind, Func<A, B, C> project) Source #

method StreamT<M, C> SelectMany <B, C> (Func<A, IO<B>> bind, Func<A, B, C> project) Source #

method StreamT<M, C> SelectMany <B, C> (Func<A, K<IO, B>> bind, Func<A, B, C> project) Source #

Operators

operator + (StreamT<M, A> lhs, K<StreamT<M>, A> rhs) Source #

operator & (StreamT<M, A> lhs, K<StreamT<M>, A> rhs) Source #

operator >> (StreamT<M, A> lhs, K<StreamT<M>, A> rhs) Source #

operator >> (StreamT<M, A> lhs, K<StreamT<M>, Unit> rhs) Source #

class StreamTExtensions Source #

StreamT extensions

Methods

method StreamT<M, A> As <M, A> (this K<StreamT<M>, A> ma) Source #

where M : Monad<M>

method MList<A> As <M, A> (this K<MList, A> ma) Source #

where M : Monad<M>

method K<M, Option<(A Head, StreamT<M, A> Tail)>> Run <M, A> (this K<StreamT<M>, A> mma) Source #

where M : Monad<M>

method K<M, A> Combine <M, A> (this K<StreamT<M>, A> mma) Source #

where M : Monad<M>, MonoidK<M>

Execute the stream's inner monad M, combining the results using its MonoidK<M>.Combine operator.

Parameters

param mma

Stream to combine

returns

Result of the combined effects

method StreamT<M, A> Flatten <M, A> (this K<StreamT<M>, StreamT<M, A>> mma) Source #

where M : Monad<M>

method StreamT<M, A> Flatten <M, A> (this K<StreamT<M>, K<StreamT<M>, A>> mma) Source #

where M : Monad<M>

method K<M, MList<A>> Flatten <M, A> (this K<M, MList<K<M, MList<A>>>> mma) Source #

where M : Monad<M>

method K<M, MList<A>> Flatten <M, A> (this MList<K<M, MList<A>>> mma) Source #

where M : Monad<M>

method K<M, MList<A>> Append <M, A> (this K<M, MList<A>> xs, K<M, MList<A>> ys) Source #

where M : Monad<M>

method StreamT<M, B> Bind <M, A, B> (this Pure<A> ma, Func<A, StreamT<M, B>> f) Source #

where M : Monad<M>

method StreamT<M, B> Bind <M, A, B> (this Pure<A> ma, Func<A, K<StreamT<M>, B>> f) Source #

where M : Monad<M>

method StreamT<M, B> Bind <M, A, B> (this IO<A> ma, Func<A, StreamT<M, B>> f) Source #

where M : Monad<M>

method StreamT<M, B> Bind <M, A, B> (this IO<A> ma, Func<A, K<StreamT<M>, B>> f) Source #

where M : Monad<M>

method StreamT<M, C> SelectMany <M, A, B, C> ( this Pure<A> ma, Func<A, StreamT<M, B>> bind, Func<A, B, C> project) Source #

where M : Monad<M>

method StreamT<M, C> SelectMany <M, A, B, C> ( this Pure<A> ma, Func<A, K<StreamT<M>, B>> bind, Func<A, B, C> project) Source #

where M : Monad<M>

method StreamT<M, C> SelectMany <M, A, B, C> ( this IO<A> ma, Func<A, StreamT<M, B>> bind, Func<A, B, C> project) Source #

where M : Monad<M>

method StreamT<M, C> SelectMany <M, A, B, C> ( this IO<A> ma, Func<A, K<StreamT<M>, B>> bind, Func<A, B, C> project) Source #

where M : Monad<M>

method K<M, Unit> Iter <M, A> (this K<StreamT<M>, A> ma) Source #

where M : Monad<M>

Iterate the stream, ignoring any result.

method K<M, Option<A>> Head <M, A> (this K<StreamT<M>, A> ma) Source #

where M : Monad<M>

Retrieve the head of the sequence

method K<M, A> HeadUnsafe <M, A> (this K<StreamT<M>, A> ma) Source #

where M : Monad<M>

Retrieve the head of the sequence

method StreamT<M, A> Tail <M, A> (this K<StreamT<M>, A> ma) Source #

where M : Monad<M>

Retrieve the head of the sequence

method StreamT<M, S> Fold <M, A,S> (this K<StreamT<M>, A> ma, S state, Func<S, A, Option<S>> f) Source #

where M : Monad<M>

Fold the stream itself, yielding the latest state value when the fold function returns None

Parameters

type S

State type

param state

Initial state of the fold

param f

Fold operation

returns

Stream transformer

method StreamT<M, S> FoldUntil <M, A, S> ( this K<StreamT<M>, A> ma, S state, Func<S, A, S> f, Func<S, A, bool> until) Source #

where M : Monad<M>

Fold the stream itself, yielding values when the until predicate is true

Parameters

type S

State type

param state

Initial state of the fold

param f

Fold operation

param until

Predicate

returns

Stream transformer

method StreamT<M, S> FoldWhile <M, A,S> ( this K<StreamT<M>, A> ma, S state, Func<S, A, S> f, Func<S, A, bool> @while) Source #

where M : Monad<M>

Fold the stream itself, yielding values when the until predicate is true

Parameters

type S

State type

param state

Initial state of the fold

param f

Fold operation

param until

Predicate

returns

Stream transformer

method K<M, S> FoldM <M, A, S> ( this K<StreamT<M>, A> ma, S state, Func<S, A, K<M, S>> f) Source #

where M : Monad<M>

Left fold

Parameters

type S

State type

param state

Initial state

param f

Folding function

returns

Accumulate state wrapped in the StreamT inner monad

method StreamT<M, A> Combine <M, A> ( this K<StreamT<M>, A> first, StreamT<M, A> second) Source #

where M : Monad<M>

Concatenate streams

Parameters

returns

Stream transformer

method StreamT<M, A> Combine <M, A> ( this K<StreamT<M>, A> first, K<StreamT<M>, A> second) Source #

where M : Monad<M>

Concatenate streams

Parameters

returns

Stream transformer

method StreamT<M, A> Merge <M, A> ( this K<StreamT<M>, A> first, K<StreamT<M>, A> second) Source #

where M : Monad<M>

Interleave the items of many streams

Parameters

param first

First stream to merge with

param second

Second stream to merge with

param rest

N streams to merge

returns

Stream transformer

method StreamT<M, A> Merge <M, A> ( this K<StreamT<M>, A> first, K<StreamT<M>, A> second, params K<StreamT<M>, A>[] rest) Source #

where M : Monad<M>

Interleave the items of two streams

Parameters

param first

First stream to merge with

param second

Second stream to merge with

returns

Stream transformer

method StreamT<M, (A First, B Second)> Zip <M, A, B> ( this K<StreamT<M>, A> first, K<StreamT<M>, B> second) Source #

where M : Monad<M>

Merge the items of two streams into pairs

Parameters

param first

First stream to merge with

param second

Other stream to merge with

returns

Stream transformer

method StreamT<M, (A First, B Second, C Third)> Zip <M, A, B, C> ( this K<StreamT<M>, A> first, K<StreamT<M>, B> second, K<StreamT<M>, C> third) Source #

where M : Monad<M>

Merge the items of two streams into 3-tuples

Parameters

param first

First stream to merge with

param second

Second stream to merge with

param third

Third stream to merge with

returns

Stream transformer

method StreamT<M, (A First, B Second, C Third, D Fourth)> Zip <M, A, B, C, D> ( this K<StreamT<M>, A> first, K<StreamT<M>, B> second, K<StreamT<M>, C> third, K<StreamT<M>, D> fourth) Source #

where M : Monad<M>

Merge the items of two streams into 4-tuples

Parameters

param first

First stream to merge with

param second

Second stream to merge with

param third

Third stream to merge with

param fourth

Fourth stream to merge with

returns

Stream transformer

method StreamT<M, A> Somes <M, A> (this IAsyncEnumerable<OptionT<M, A>> stream) Source #

where M : Monad<M>

Access the Some values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of optional values

returns

Stream of values

method StreamT<M, A> SomesStream <M, A> (this IAsyncEnumerable<Option<A>> stream) Source #

where M : Monad<M>

Access the Some values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of optional values

returns

Stream of values

method StreamT<M, A> Somes <M, A> (this IEnumerable<OptionT<M, A>> stream) Source #

where M : Monad<M>

Access the Some values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of optional values

returns

Stream of values

method StreamT<M, A> SomesStream <M, A> (this IEnumerable<Option<A>> stream) Source #

where M : Monad<M>

Access the Some values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of optional values

returns

Stream of values

method StreamT<M, A> Rights <M, L, A> (this IAsyncEnumerable<EitherT<L, M, A>> stream) Source #

where M : Monad<M>

Access the Right values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, A> RightsStream <M, L, A> (this IAsyncEnumerable<Either<L, A>> stream) Source #

where M : Monad<M>

Access the Right values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, A> Rights <M, L, A> (this IEnumerable<EitherT<L, M, A>> stream) Source #

where M : Monad<M>

Access the Right values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, A> RightsStream <M, L, A> (this IEnumerable<Either<L, A>> stream) Source #

where M : Monad<M>

Access the Right values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, L> Lefts <M, L, A> (this IAsyncEnumerable<EitherT<L, M, A>> stream) Source #

where M : Monad<M>

Access the Left values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, L> LeftsStream <M, L, A> (this IAsyncEnumerable<Either<L, A>> stream) Source #

where M : Monad<M>

Access the Left values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, L> Lefts <M, L, A> (this IEnumerable<EitherT<L, M, A>> stream) Source #

where M : Monad<M>

Access the Left values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, L> LeftsStream <M, L, A> (this IEnumerable<Either<L, A>> stream) Source #

where M : Monad<M>

Access the Succ values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, A> Succs <M, A> (this IAsyncEnumerable<FinT<M, A>> stream) Source #

where M : Monad<M>

Access the Succ values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, A> SuccsStream <M, A> (this IAsyncEnumerable<Fin<A>> stream) Source #

where M : Monad<M>

Access the Succ values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, A> Succs <M, A> (this IEnumerable<FinT<M, A>> stream) Source #

where M : Monad<M>

Access the Succ values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, A> SuccsStream <M, A> (this IEnumerable<Fin<A>> stream) Source #

where M : Monad<M>

Access the Succ values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, Error> Fails <M, A> (this IAsyncEnumerable<FinT<M, A>> stream) Source #

where M : Monad<M>

Access the Fail values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, Error> FailsStream <M, A> (this IAsyncEnumerable<Fin<A>> stream) Source #

where M : Monad<M>

Access the Fail values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, Error> Fails <M, A> (this IEnumerable<FinT<M, A>> stream) Source #

where M : Monad<M>

Access the Fail values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, Error> FailsStream <M, A> (this IEnumerable<Fin<A>> stream) Source #

where M : Monad<M>

Access the Fail values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, A> Succs <M, L, A> (this IAsyncEnumerable<ValidationT<L, M, A>> stream) Source #

where L : Monoid<L>
where M : Monad<M>

Access the Right values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, A> SuccsStream <M, L, A> (this IAsyncEnumerable<Validation<L, A>> stream) Source #

where L : Monoid<L>
where M : Monad<M>

Access the Right values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, A> Succs <M, L, A> (this IEnumerable<ValidationT<L, M, A>> stream) Source #

where L : Monoid<L>
where M : Monad<M>

Access the Right values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, A> SuccsStream <M, L, A> (this IEnumerable<Validation<L, A>> stream) Source #

where L : Monoid<L>
where M : Monad<M>

Access the Right values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, L> Fails <M, L, A> (this IAsyncEnumerable<ValidationT<L, M, A>> stream) Source #

where L : Monoid<L>
where M : Monad<M>

Access the Left values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, L> FailsStream <M, L, A> (this IAsyncEnumerable<Validation<L, A>> stream) Source #

where L : Monoid<L>
where M : Monad<M>

Access the Left values from the asynchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, L> Fails <M, L, A> (this IEnumerable<ValidationT<L, M, A>> stream) Source #

where L : Monoid<L>
where M : Monad<M>

Access the Left values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

method StreamT<M, L> FailsStream <M, L, A> (this IEnumerable<Validation<L, A>> stream) Source #

where L : Monoid<L>
where M : Monad<M>

Access the Succ values from the synchronous stream

Parameters

type M

Transformer monad

type A

Bound value type

param stream

Stream of values

returns

Stream of values

class EffExtensions Source #

Methods

method StreamT<M, B> Map <M, A, B> (this Func<A, B> f, K<StreamT<M>, A> ma) Source #

where M : Monad<M>

Functor map operation

Unwraps the value within the functor, passes it to the map function f provided, and then takes the mapped value and wraps it back up into a new functor.

Parameters

param ma

Functor to map

param f

Mapping function

returns

Mapped functor

method StreamT<M, B> Map <M, A, B> (this Func<A, B> f, StreamT<M, A> ma) Source #

where M : Monad<M>

Functor map operation

Unwraps the value within the functor, passes it to the map function f provided, and then takes the mapped value and wraps it back up into a new functor.

Parameters

param ma

Functor to map

param f

Mapping function

returns

Mapped functor

method StreamT<M, B> Action <M, A, B> (this StreamT<M, A> ma, K<StreamT<M>, B> mb) Source #

where M : Monad<M>

Applicative action: runs the first applicative, ignores the result, and returns the second applicative

method StreamT<M, B> Action <M, A, B> (this K<StreamT<M>, A> ma, K<StreamT<M>, B> mb) Source #

where M : Monad<M>

Applicative action: runs the first applicative, ignores the result, and returns the second applicative

method StreamT<M, B> Apply <M, A, B> (this StreamT<M, Func<A, B>> mf, K<StreamT<M>, A> ma) Source #

where M : Monad<M>

Applicative functor apply operation

Unwraps the value within the ma applicative-functor, passes it to the unwrapped function(s) within mf, and then takes the resulting value and wraps it back up into a new applicative-functor.

Parameters

param ma

Value(s) applicative functor

param mf

Mapping function(s)

returns

Mapped applicative functor

method StreamT<M, B> Apply <M, A, B> (this K<StreamT<M>, Func<A, B>> mf, K<StreamT<M>, A> ma) Source #

where M : Monad<M>

Applicative functor apply operation

Unwraps the value within the ma applicative-functor, passes it to the unwrapped function(s) within mf, and then takes the resulting value and wraps it back up into a new applicative-functor.

Parameters

param ma

Value(s) applicative functor

param mf

Mapping function(s)

returns

Mapped applicative functor

class StreamT Source #

StreamT module

Methods

method StreamT<M, A> pure <M, A> (A value) Source #

where M : Monad<M>

Construct a singleton stream

Parameters

param value

Single value in the stream

returns

Stream transformer

method StreamT<M, A> liftF <F, M, A> (K<F, A> items) Source #

where M : Monad<M>
where F : Foldable<F>

Lift any foldable into the stream

This is likely to consume the foldable structure eagerly

Parameters

param foldable

Foldable structure to lift

returns

Stream transformer

method StreamT<M, A> lift <M, A> (IAsyncEnumerable<A> items) Source #

where M : Monad<M>

Lift an async-enumerable into the stream

Parameters

param stream

Sequence to lift

returns

Stream transformer

method StreamT<M, A> liftM <M, A> (IAsyncEnumerable<K<M, A>> items) Source #

where M : Monad<M>

Lift an async-enumerable into the stream

Parameters

param stream

Sequence to lift

returns

Stream transformer

method StreamT<M, A> lift <M, A> (IEnumerable<A> items) Source #

where M : Monad<M>

Lift an enumerable into the stream

Parameters

param stream

Sequence to lift

returns

Stream transformer

method StreamT<M, A> liftM <M, A> (IEnumerable<K<M, A>> items) Source #

where M : Monad<M>

Lift an enumerable into the stream

Parameters

param stream

Sequence to lift

returns

Stream transformer

method StreamT<M, A> lift <M, A> (Seq<A> items) Source #

where M : Monad<M>

Lift a (possibly lazy) sequence into the stream

Parameters

param list

Sequence to lift

returns

Stream transformer

method StreamT<M, A> liftM <M, A> (Seq<K<M, A>> items) Source #

where M : Monad<M>

Lift a (possibly lazy) sequence into the stream

Parameters

param list

Sequence to lift

returns

Stream transformer

method StreamT<M, A> lift <M, A> (K<M, A> ma) Source #

where M : Monad<M>

Lift an effect into the stream

Parameters

param ma

Effect to lift

returns

Stream transformer

method StreamT<M, A> liftIO <M, A> (IO<A> ma) Source #

where M : Monad<M>

Lift side effect into the stream

Parameters

param ma

Side effect to lift

returns

Stream transformer

method StreamT<M, A> liftIO <M, A> (K<IO, A> ma) Source #

where M : Monad<M>

Lift side effect into the stream

Parameters

param ma

Side effect to lift

returns

Stream transformer

method StreamT<M, A> merge <M, A> (K<StreamT<M>, A> first, K<StreamT<M>, A> second) Source #

where M : Monad<M>

Interleave the items of two streams

Parameters

param second

Other stream to merge with

returns

Stream transformer

method StreamT<M, A> merge <M, A> (K<StreamT<M>, A> first, K<StreamT<M>, A> second, params K<StreamT<M>, A>[] rest) Source #

where M : Monad<M>

Interleave the items of many streams

Parameters

param rhs

Other stream to merge with

returns

Stream transformer

method StreamT<M, (A First, B Second)> zip <M, A, B> (K<StreamT<M>, A> first, K<StreamT<M>, B> second) Source #

where M : Monad<M>

Merge the items of two streams into pairs

Parameters

param second

Other stream to merge with

returns

Stream transformer

method StreamT<M, (A First, B Second, C Third)> zip <M, A, B, C> ( K<StreamT<M>, A> first, K<StreamT<M>, B> second, K<StreamT<M>, C> third) Source #

where M : Monad<M>

Merge the items of two streams into 3-tuples

Parameters

param second

Second stream to merge with

param third

Third stream to merge with

returns

Stream transformer

method StreamT<M, (A First, B Second, C Third, D Fourth)> zip <M, A, B, C, D> ( K<StreamT<M>, A> first, K<StreamT<M>, B> second, K<StreamT<M>, C> third, K<StreamT<M>, D> fourth) Source #

where M : Monad<M>

Merge the items of two streams into 4-tuples

Parameters

param second

Second stream to merge with

param third

Third stream to merge with

param fourth

Fourth stream to merge with

returns

Stream transformer

class StreamT <M> Source #

where M : Monad<M>

StreamT trait implementations

Methods

method StreamT<M, A> pure <A> (A value) Source #

method StreamT<M, A> lift <A> (IEnumerable<A> items) Source #

method StreamT<M, A> lift <A> (IAsyncEnumerable<A> items) Source #

method StreamT<M, A> lift <A> (Seq<A> items) Source #

method StreamT<M, A> liftIO <A> (IO<A> ma) Source #

class Prelude Source #

StreamT module

Methods

method StreamT<M, A> merge <M, A> (K<StreamT<M>, A> first, K<StreamT<M>, A> second) Source #

where M : Monad<M>

Interleave the items of two streams

Parameters

param first

First stream to merge with

param second

Other stream to merge with

returns

Stream transformer

method StreamT<M, A> merge <M, A> (K<StreamT<M>, A> first, K<StreamT<M>, A> second, params K<StreamT<M>, A>[] rest) Source #

where M : Monad<M>

Interleave the items of many streams

Parameters

param first

First stream to merge with

param second

Second stream to merge with

param rest

N streams to merge

returns

Stream transformer

method StreamT<M, (A First, B Second)> zip <M, A, B> (K<StreamT<M>, A> first, K<StreamT<M>, B> second) Source #

where M : Monad<M>

Merge the items of two streams into pairs

Parameters

param first

First stream to merge with

param second

Other stream to merge with

returns

Stream transformer

method StreamT<M, (A First, B Second, C Third)> zip <M, A, B, C> ( K<StreamT<M>, A> first, K<StreamT<M>, B> second, K<StreamT<M>, C> third) Source #

where M : Monad<M>

Merge the items of two streams into 3-tuples

Parameters

param first

First stream to merge with

param second

Second stream to merge with

param third

Third stream to merge with

returns

Stream transformer

method StreamT<M, (A First, B Second, C Third, D Fourth)> zip <M, A, B, C, D> ( K<StreamT<M>, A> first, K<StreamT<M>, B> second, K<StreamT<M>, C> third, K<StreamT<M>, D> fourth) Source #

where M : Monad<M>

Merge the items of two streams into 4-tuples

Parameters

param first

First stream to merge with

param second

Second stream to merge with

param third

Third stream to merge with

param fourth

Fourth stream to merge with

returns

Stream transformer

class Prelude Source #

Methods

method StreamT<M, B> map <M, A, B> (Func<A, B> f, K<StreamT<M>, A> ma) Source #

where M : Monad<M>

Functor map operation

Unwraps the value within the functor, passes it to the map function f provided, and then takes the mapped value and wraps it back up into a new functor.

Parameters

param ma

Functor to map

param f

Mapping function

returns

Mapped functor

method StreamT<M, B> action <M, A, B> (K<StreamT<M>, A> ma, K<StreamT<M>, B> mb) Source #

where M : Monad<M>

Applicative action: runs the first applicative, ignores the result, and returns the second applicative

method StreamT<M, B> apply <M, A, B> (K<StreamT<M>, Func<A, B>> mf, K<StreamT<M>, A> ma) Source #

where M : Monad<M>

Applicative functor apply operation

Unwraps the value within the ma applicative-functor, passes it to the unwrapped function(s) within mf, and then takes the resulting value and wraps it back up into a new applicative-functor.

Parameters

param ma

Value(s) applicative functor

param mf

Mapping function(s)

returns

Mapped applicative functor