LanguageExt.Pipes

LanguageExt.Pipes ProducerT

Contents

record ProducerT <OUT, M, A> (PipeT<Unit, OUT, M, A> Proxy) Source #

where M : Monad<M>

ProducerT streaming producer monad-transformer instance

Methods

method ProducerT<OUT1, M, A> Compose <OUT1> (PipeT<OUT, OUT1, M, A> rhs) Source #

method EffectT<M, A> Compose (ConsumerT<OUT, M, A> rhs) Source #

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

method ProducerT<OUT, M, B> MapM <B> (Func<K<M, A>, K<M, B>> f) Source #

method ProducerT<OUT, M, B> MapIO <B> (Func<IO<A>, IO<B>> f) Source #

method ProducerT<OUT, M, B> ApplyBack <B> (ProducerT<OUT, M, Func<A, B>> ff) Source #

method ProducerT<OUT, M, B> Action <B> (ProducerT<OUT, M, B> fb) Source #

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

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

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

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

method ProducerT<OUT, M, B> Bind <B> (Func<A, Lift<B>> f) Source #

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

method ProducerT<OUT, M, C> SelectMany <B, C> (Func<A, ProducerT<OUT, M, B>> f, Func<A, B, C> g) Source #

method ProducerT<OUT, M, C> SelectMany <B, C> (Func<A, K<M, B>> f, Func<A, B, C> g) Source #

method ProducerT<OUT, M, C> SelectMany <B, C> (Func<A, IO<B>> f, Func<A, B, C> g) Source #

method ProducerT<OUT, M, C> SelectMany <B, C> (Func<A, Pure<B>> f, Func<A, B, C> g) Source #

method ProducerT<OUT, M, C> SelectMany <B, C> (Func<A, Lift<B>> f, Func<A, B, C> g) Source #

method ProducerT<OUT, M, Unit> Fold ( Schedule Time, Func<OUT, A, OUT> Fold, OUT Init) Source #

Fold the given pipe until the Schedule completes. Once complete, the pipe yields the aggregated value downstream.

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

param Time

Schedule to run each item

param Fold

Fold function

param Init

Initial state

returns

method ProducerT<OUT, M, Unit> FoldUntil ( Func<OUT, A, OUT> Fold, Func<(OUT State, A Value), bool> Pred, OUT Init) Source #

Fold the given pipe until the predicate is true. Once true the pipe yields the aggregated value downstream.

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

param Fold

Fold function

param Pred

Until predicate

param Init

Initial state

returns

method ProducerT<OUT, M, Unit> FoldUntil ( Schedule Time, Func<OUT, A, OUT> Fold, Func<(OUT State, A Value), bool> Pred, OUT Init) Source #

Fold the given pipe until the predicate is true or the Schedule completes. Once true, or completed, the pipe yields the aggregated value downstream.

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

param Time

Schedule to run each item

param Fold

Fold function

param Pred

Until predicate

param Init

Initial state

returns

method ProducerT<OUT, M, Unit> FoldWhile ( Func<OUT, A, OUT> Fold, Func<(OUT State, A Value), bool> Pred, OUT Init) Source #

Fold the given pipe while the predicate is true. Once false the pipe yields the aggregated value downstream.

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

param Fold

Fold function

param Pred

Until predicate

param Init

Initial state

returns

method ProducerT<OUT, M, Unit> FoldWhile ( Schedule Time, Func<OUT, A, OUT> Fold, Func<(OUT State, A Value), bool> Pred, OUT Init) Source #

Fold the given pipe while the predicate is true or the Schedule completes. Once false, or completed, the pipe yields the aggregated value downstream.

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

param Time

Schedule to run each item

param Fold

Fold function

param Pred

Until predicate

param Init

Initial state

returns

Operators

operator | (ProducerT<OUT, M, A> lhs, ConsumerT<OUT, M, A> rhs) Source #

class ProducerTExtensions Source #

Methods

method ProducerT<OUT, M, A> ToProducer <OUT, M, A> (this K<PipeT<Unit, OUT, M>, A> pipe) Source #

where M : Monad<M>

Transformation from PipeT to ProducerT.

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

where M : Monad<M>

Downcast

method Producer<RT, OUT, A> ToEff <RT, OUT, A> (this K<ProducerT<OUT, Eff<RT>>, A> ma) Source #

Convert to the Eff version of Producer

method ProducerT<OUT, M, C> SelectMany <OUT, M, A, B, C> ( this K<M, A> ma, Func<A, ProducerT<OUT, M, B>> f, Func<A, B, C> g) Source #

where M : Monad<M>

Monad bind

method ProducerT<OUT, M, C> SelectMany <OUT, M, A, B, C> ( this IO<A> ma, Func<A, ProducerT<OUT, M, B>> f, Func<A, B, C> g) Source #

where M : Monad<M>

Monad bind

method ProducerT<OUT, M, C> SelectMany <OUT, M, A, B, C> ( this Pure<A> ma, Func<A, ProducerT<OUT, M, B>> f, Func<A, B, C> g) Source #

where M : Monad<M>

Monad bind

method ProducerT<OUT, M, C> SelectMany <OUT, M, A, B, C> ( this Lift<A> ff, Func<A, ProducerT<OUT, M, B>> f, Func<A, B, C> g) Source #

where M : Monad<M>

Monad bind

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

where M : Monad<M>

Monad bind

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

where M : Monad<M>

Monad bind

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

where M : Monad<M>

Monad bind

method ProducerT<OUT, M, B> Bind <OUT, M, A, B> ( this Lift<A> ff, Func<A, ProducerT<OUT, M, B>> f) Source #

where M : Monad<M>

Monad bind

method ProducerT<OUT, M, C> SelectMany <OUT, E, M, A, C> ( this K<ProducerT<OUT, M>, A> ma, Func<A, Guard<E, Unit>> bind, Func<A, Unit, C> project) Source #

where M : Monad<M>, Fallible<E, M>

Monad bind operation

method ProducerT<OUT, M, C> SelectMany <OUT, E, M, B, C> ( this Guard<E, Unit> ma, Func<Unit, K<ProducerT<OUT, M>, B>> bind, Func<Unit, B, C> project) Source #

where M : Monad<M>, Fallible<E, M>

Monad bind operation

class ProducerT Source #

ProducerT streaming producer monad-transformer

Methods

method ProducerT<OUT, M, Unit> yield <M, OUT> (OUT value) Source #

where M : Monad<M>

Yield a value downstream

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

returns

method ProducerT<OUT, M, Unit> yieldAll <M, OUT> (IEnumerable<OUT> values) Source #

where M : Monad<M>

Yield all values downstream

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

returns

method ProducerT<OUT, M, Unit> yieldAll <M, OUT> (IAsyncEnumerable<OUT> values) Source #

where M : Monad<M>

Yield all values downstream

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

returns

method ProducerT<OUT, M, Unit> yieldRepeat <M, OUT> (K<M, OUT> ma) Source #

where M : Monad<M>

Evaluate the M monad repeatedly, yielding its bound values downstream

Parameters

type IN

Stream value to consume

type OUT

Stream value to produce

type M

Lifted monad type

returns

method ProducerT<OUT, M, Unit> yieldRepeatIO <M, OUT> (IO<OUT> ma) Source #

where M : Monad<M>

Evaluate the IO monad repeatedly, yielding its bound values downstream

Parameters

type IN

Stream value to consume

type OUT

Stream value to produce

type M

Lifted monad type

returns

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

where M : Monad<M>

Create a producer that simply returns a bound value without yielding anything

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> fail <OUT, E, M, A> (E value) Source #

where M : Monad<M>, Fallible<E, M>

Create a producer that always fails

Parameters

type OUT

Stream value to produce

type E

Failure type

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> error <OUT, M, A> (Error value) Source #

where M : Monad<M>, Fallible<M>

Create a producer that always fails

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> empty <OUT, M, A> () Source #

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

Create a producer that yields nothing at all

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> lift <OUT, M, A> (Func<A> f) Source #

where M : Monad<M>

Create a producer that lazily returns a bound value without yielding anything

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> liftM <OUT, M, A> (K<M, A> ma) Source #

where M : Monad<M>

Create a producer that simply returns the bound value of the lifted monad without yielding anything

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

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

where M : Monad<M>

Create a producer that simply returns the bound value of the lifted monad without yielding anything

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> liftT <OUT, M, A> (Func<ProducerT<OUT, M, A>> f) Source #

where M : Monad<M>

Create a lazy proxy

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> liftT <OUT, M, A> (Func<ValueTask<ProducerT<OUT, M, A>>> f) Source #

where M : Monad<M>

Create an asynchronous lazy proxy

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> liftT <OUT, M, A> (ValueTask<ProducerT<OUT, M, A>> f) Source #

where M : Monad<M>

Create an asynchronous proxy

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> repeat <OUT, M, A> (ProducerT<OUT, M, A> ma) Source #

where M : Monad<M>

Continually repeat the provided operation

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> repeat <OUT, M, A> (Schedule schedule, ProducerT<OUT, M, A> ma) Source #

where M : Monad<M>

Repeat the provided operation based on the schedule provided

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> repeatM <OUT, M, A> (K<M, A> ma) Source #

where M : Monad<M>

Continually lift & repeat the provided operation

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, A> repeatM <OUT, M, A> (Schedule schedule, K<M, A> ma) Source #

where M : Monad<M>

Repeat the provided operation based on the schedule provided

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

returns

method ProducerT<OUT, M, Unit> fold <OUT, M, A> ( Schedule Time, Func<OUT, A, OUT> Fold, OUT Init, ProducerT<OUT, M, A> Item) Source #

where M : Monad<M>

Fold the given pipe until the Schedule completes. Once complete, the pipe yields the aggregated value downstream.

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

param Time

Schedule to run each item

param Fold

Fold function

param Init

Initial state

param Item

Pipe to fold

returns

method ProducerT<OUT, M, Unit> foldUntil <OUT, M, A> ( Func<OUT, A, OUT> Fold, Func<(OUT State, A Value), bool> Pred, OUT Init, ProducerT<OUT, M, A> Item) Source #

where M : Monad<M>

Fold the given pipe until the predicate is true. Once true the pipe yields the aggregated value downstream.

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

param Fold

Fold function

param Pred

Until predicate

param Init

Initial state

param Item

Pipe to fold

returns

method ProducerT<OUT, M, Unit> foldUntil <OUT, M, A> ( Schedule Time, Func<OUT, A, OUT> Fold, Func<(OUT State, A Value), bool> Pred, OUT Init, ProducerT<OUT, M, A> Item) Source #

where M : Monad<M>

Fold the given pipe until the predicate is true or the Schedule completes. Once true, or completed, the pipe yields the aggregated value downstream.

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

param Time

Schedule to run each item

param Fold

Fold function

param Pred

Until predicate

param Init

Initial state

param Item

Pipe to fold

returns

method ProducerT<OUT, M, Unit> foldWhile <OUT, M, A> ( Func<OUT, A, OUT> Fold, Func<(OUT State, A Value), bool> Pred, OUT Init, ProducerT<OUT, M, A> Item) Source #

where M : Monad<M>

Fold the given pipe while the predicate is true. Once false the pipe yields the aggregated value downstream.

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

param Fold

Fold function

param Pred

Until predicate

param Init

Initial state

param Item

Pipe to fold

returns

method ProducerT<OUT, M, Unit> foldWhile <OUT, M, A> ( Schedule Time, Func<OUT, A, OUT> Fold, Func<(OUT State, A Value), bool> Pred, OUT Init, ProducerT<OUT, M, A> Item) Source #

where M : Monad<M>

Fold the given pipe while the predicate is true or the Schedule completes. Once false, or completed, the pipe yields the aggregated value downstream.

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

type A

Bound value type

param Time

Schedule to run each item

param Fold

Fold function

param Pred

Until predicate

param Init

Initial state

param Item

Pipe to fold

returns

method ProducerT<OUT, M, Unit> merge <OUT, M> ( params ProducerT<OUT, M, Unit>[] producers) Source #

where M : Monad<M>

Merge multiple producers

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

param producers

Producers to merge

param settings

Buffer settings

returns

Merged producer

method ProducerT<OUT, M, Unit> merge <OUT, M> ( Seq<ProducerT<OUT, M, Unit>> producers, Buffer<OUT>? settings = null) Source #

where M : Monad<M>

Merge multiple producers

Parameters

type OUT

Stream value to produce

type M

Lifted monad type

param producers

Producers to merge

param settings

Buffer settings

returns

Merged producer

class ProducerT <OUT, M> Source #

where M : Monad<M>