- Pipe <RT, IN, OUT, A>
- Value
- Pipe (Proxy<RT, Unit, IN, Unit, OUT, A> value)
- ToProxy ()
- Bind <S> (Func<A, Proxy<RT, Unit, IN, Unit, OUT, S>> f)
- Map <S> (Func<A, S> f)
- Bind <B> (Func<A, Pipe<RT, IN, OUT, B>> f)
- Select <B> (Func<A, B> f)
- For <C1, C> (Func<OUT, Proxy<RT, Unit, IN, C1, C, Unit>> body)
- Action <S> (Proxy<RT, Unit, IN, Unit, OUT, S> r)
- PairEachRequestWithRespond <UOutA, AUInA> (Func<Unit, Proxy<RT, UOutA, AUInA, Unit, IN, A>> lhs)
- ReplaceRequest <UOutA, AUInA> (Func<Unit, Proxy<RT, UOutA, AUInA, Unit, OUT, IN>> lhs)
- PairEachRespondWithRequest <DInC, DOutC> (Func<OUT, Proxy<RT, Unit, OUT, DInC, DOutC, A>> rhs)
- ReplaceRespond <DInC, DOutC> (Func<OUT, Proxy<RT, Unit, IN, DInC, DOutC, Unit>> rhs)
- Reflect ()
- Observe ()
- Deconstruct (out Proxy<RT, Unit, IN, Unit, OUT, A> value)
- | (Producer<RT, IN, A> p1, Pipe<RT, IN, OUT, A> p2)
- | (Producer<IN, A> p1, Pipe<RT, IN, OUT, A> p2)
- | (Producer<OUT, IN> p1, Pipe<RT, IN, OUT, A> p2)
- | (Pipe<RT, IN, OUT, A> p1, Consumer<OUT, A> p2)
- | (Pipe<RT, IN, OUT, A> p1, Consumer<RT, OUT, A> p2)
- Then <C> (Pipe<RT, OUT, C, A> pipe)
- SelectMany <B> (Func<A, Release<B>> bind)
- SelectMany <B, C> (Func<A, Release<B>> bind, Func<A, B, C> project)
- SelectMany <B> (Func<A, Pipe<IN, OUT, B>> bind)
- SelectMany <B, C> (Func<A, Pipe<IN, OUT, B>> bind, Func<A, B, C> project)
- SelectMany <B> (Func<A, Pipe<RT, IN, OUT, B>> f)
- SelectMany <B, C> (Func<A, Pipe<RT, IN, OUT, B>> f, Func<A, B, C> project)
- & ( Pipe<RT, IN, OUT, A> lhs, Pipe<RT, IN, OUT, A> rhs)
- Pipe
- Pure <RT, A, B, R> (R value)
- awaiting <RT, A, Y> ()
- yield <RT, IN, OUT> (OUT value)
- yieldAll <RT, IN, OUT> (IAsyncEnumerable<OUT> xs)
- yieldAll <RT, IN, OUT> (IObservable<OUT> xs)
- filter <RT, A> (Func<A, bool> f)
- map <RT, A, B, R> (Func<A, B> f)
- map <RT, A, B> (Func<A, B> f)
- map <A, B> (Func<A, B> f)
- mapM <RT, A, B, R> (Func<A, Aff<RT, B>> f)
- mapM <RT, A> (Func<A, Aff<RT, A>> f)
- mapM <RT, A, B, R> (Func<A, Aff<B>> f)
- mapM <RT, A, B, R> (Func<A, Eff<RT, B>> f)
- mapM <RT, A> (Func<A, Eff<RT, A>> f)
- mapM <RT, A, B, R> (Func<A, Eff<B>> f)
- lift <RT, A, B, R> (Aff<R> ma)
- lift <RT, A, B, R> (Eff<R> ma)
- lift <RT, A, B, R> (Aff<RT, R> ma)
- lift <RT, A, B, R> (Eff<RT, R> ma)
- use <RT, IN, OUT, R> (Aff<R> ma)
- use <RT, IN, OUT, R> (Eff<R> ma)
- use <RT, IN, OUT, R> (Aff<RT, R> ma)
- use <RT, IN, OUT, R> (Eff<RT, R> ma)
- use <RT, IN, OUT, R> (Aff<R> ma, Func<R, Unit> dispose)
- use <RT, IN, OUT, R> (Eff<R> ma, Func<R, Unit> dispose)
- use <RT, IN, OUT, R> (Aff<RT, R> ma, Func<R, Unit> dispose)
- use <RT, IN, OUT, R> (Eff<RT, R> ma, Func<R, Unit> dispose)
- release <RT, IN, OUT, R> (R dispose)
- foldWhile <RT, IN, OUT> (OUT Initial, Func<OUT, IN, OUT> Fold, Func<OUT, bool> WhileState)
- foldUntil <RT, IN, OUT> (OUT Initial, Func<OUT, IN, OUT> Fold, Func<OUT, bool> UntilState)
- foldWhile <RT, IN, OUT> (OUT Initial, Func<OUT, IN, OUT> Fold, Func<IN, bool> WhileValue)
- foldUntil <RT, IN, OUT> (OUT Initial, Func<OUT, IN, OUT> Fold, Func<IN, bool> UntilValue)
- scan <RT, IN, OUT, S> (Func<S, IN, S> Step, S Begin, Func<S, OUT> Done)
class Pipe <RT, IN, OUT, A> Source #
Pipes both can both be await
and can yield
Upstream | Downstream
+---------+
| |
Unit <== <== Unit
| |
IN ==> ==> OUT
| | |
+----|----+
|
A
method Proxy<RT, Unit, IN, Unit, OUT, A> ToProxy () Source #
Calling this will effectively cast the sub-type to the base.
This type wraps up a Proxy
for convenience, and so it's a Proxy
proxy. So calling this method
isn't exactly the same as a cast operation, as it unwraps the Proxy
from within. It has the same effect
however, and removes a level of indirection
returns | A general |
method Proxy<RT, Unit, IN, Unit, OUT, S> Bind <S> (Func<A, Proxy<RT, Unit, IN, Unit, OUT, S>> f) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Proxy<RT, Unit, IN, Unit, OUT, S> Map <S> (Func<A, S> f) Source #
Lifts a pure function into the Proxy
domain, causing it to map the bound value within
type | B | The mapped bound value type |
param | f | The map function |
returns | A new |
method Pipe<RT, IN, OUT, B> Bind <B> (Func<A, Pipe<RT, IN, OUT, B>> f) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Pipe<RT, IN, OUT, B> Select <B> (Func<A, B> f) Source #
Lifts a pure function into the Proxy
domain, causing it to map the bound value within
type | B | The mapped bound value type |
param | f | The map function |
returns | A new |
method Proxy<RT, Unit, IN, C1, C, A> For <C1, C> (Func<OUT, Proxy<RT, Unit, IN, C1, C, Unit>> body) Source #
For(body)
loops over the Proxy p
replacing each yield
with body
param | body | Any |
returns | A new |
method Proxy<RT, Unit, IN, Unit, OUT, S> Action <S> (Proxy<RT, Unit, IN, Unit, OUT, S> r) Source #
Applicative action
Invokes this Proxy
, then the Proxy r
param | r |
|
method Proxy<RT, UOutA, AUInA, Unit, OUT, A> PairEachRequestWithRespond <UOutA, AUInA> (Func<Unit, Proxy<RT, UOutA, AUInA, Unit, IN, A>> lhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
(f +>> p) pairs each 'request' in this
with a 'respond' in lhs
.
method Proxy<RT, UOutA, AUInA, Unit, OUT, A> ReplaceRequest <UOutA, AUInA> (Func<Unit, Proxy<RT, UOutA, AUInA, Unit, OUT, IN>> lhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
method Proxy<RT, Unit, IN, DInC, DOutC, A> PairEachRespondWithRequest <DInC, DOutC> (Func<OUT, Proxy<RT, Unit, OUT, DInC, DOutC, A>> rhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
method Proxy<RT, Unit, IN, DInC, DOutC, A> ReplaceRespond <DInC, DOutC> (Func<OUT, Proxy<RT, Unit, IN, DInC, DOutC, Unit>> rhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
method Proxy<RT, OUT, Unit, IN, Unit, A> Reflect () Source #
Reverse the arrows of the Proxy
to find its dual.
returns | The dual of |
method Proxy<RT, Unit, IN, Unit, OUT, A> Observe () Source #
Observe(lift (Pure(r))) = Observe(Pure(r))
Observe(lift (m.Bind(f))) = Observe(lift(m.Bind(x => lift(f(x)))))
This correctness comes at a small cost to performance, so use this function sparingly. This function is a convenience for low-level pipes implementers. You do not need to use observe if you stick to the safe API.
method void Deconstruct (out Proxy<RT, Unit, IN, Unit, OUT, A> value) Source #
method Pipe<RT, IN, C, A> Then <C> (Pipe<RT, OUT, C, A> pipe) Source #
Composition chaining of two pipes.
We can't provide the operator overloading to chain two pipes together, because operators don't have generics of their own. And so we can use this method to chain to pipes together.
type | C | Type of value that the right hand side pipe yields |
param | pipe | Right hand side |
returns | A composition of this pipe and the |
method Pipe<RT, IN, OUT, B> SelectMany <B> (Func<A, Release<B>> bind) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Pipe<RT, IN, OUT, C> SelectMany <B, C> (Func<A, Release<B>> bind, Func<A, B, C> project) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Pipe<RT, IN, OUT, B> SelectMany <B> (Func<A, Pipe<IN, OUT, B>> bind) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Pipe<RT, IN, OUT, C> SelectMany <B, C> (Func<A, Pipe<IN, OUT, B>> bind, Func<A, B, C> project) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Pipe<RT, IN, OUT, B> SelectMany <B> (Func<A, Pipe<RT, IN, OUT, B>> f) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Pipe<RT, IN, OUT, C> SelectMany <B, C> (Func<A, Pipe<RT, IN, OUT, B>> f, Func<A, B, C> project) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
operator | (Producer<RT, IN, A> p1, Pipe<RT, IN, OUT, A> p2) Source #
Compose a Producer
and a Pipe
together into a Producer
.
param | p1 |
|
param | p2 |
|
returns |
|
operator | (Producer<IN, A> p1, Pipe<RT, IN, OUT, A> p2) Source #
Compose a Producer
and a Pipe
together into a Producer
.
param | p1 |
|
param | p2 |
|
returns |
|
operator | (Producer<OUT, IN> p1, Pipe<RT, IN, OUT, A> p2) Source #
Compose a Producer
and a Pipe
together into a Producer
.
param | p1 |
|
param | p2 |
|
returns |
|
operator | (Pipe<RT, IN, OUT, A> p1, Consumer<OUT, A> p2) Source #
Compose a Pipe
and a Consumer
together into a Consumer
.
param | p1 |
|
param | p2 |
|
returns |
|
Pipes both can both be await
and can yield
Upstream | Downstream
+---------+
| |
Unit <== <== Unit
| |
IN ==> ==> OUT
| | |
+----|----+
|
A
method Pipe<RT, A, B, R> Pure <RT, A, B, R> (R value) Source #
Monad return / pure
method Pipe<RT, A, Y, A> awaiting <RT, A, Y> () Source #
Wait for a value from upstream (whilst in a pipe)
This is the version of await
that works for pipes. In consumers, use Consumer.await
method Pipe<RT, IN, OUT, Unit> yield <RT, IN, OUT> (OUT value) Source #
Send a value downstream (whilst in a pipe)
This is the version of yield
that works for pipes. In producers, use Producer.yield
method Pipe<RT, IN, OUT, Unit> yieldAll <RT, IN, OUT> (IAsyncEnumerable<OUT> xs) Source #
method Pipe<RT, IN, OUT, Unit> yieldAll <RT, IN, OUT> (IObservable<OUT> xs) Source #
method Pipe<RT, A, A, Unit> filter <RT, A> (Func<A, bool> f) Source #
Only forwards values that satisfy the predicate.
method Pipe<RT, A, B, R> map <RT, A, B, R> (Func<A, B> f) Source #
Map the output of the pipe (not the bound value as is usual with Map)
method Pipe<RT, A, B, Unit> map <RT, A, B> (Func<A, B> f) Source #
Map the output of the pipe (not the bound value as is usual with Map)
method Pipe<A, B, Unit> map <A, B> (Func<A, B> f) Source #
Map the output of the pipe (not the bound value as is usual with Map)
method Pipe<RT, A, B, R> mapM <RT, A, B, R> (Func<A, Aff<RT, B>> f) Source #
Apply a monadic function to all values flowing downstream (not the bound value as is usual with Map)
method Pipe<RT, A, A, Unit> mapM <RT, A> (Func<A, Aff<RT, A>> f) Source #
Apply a monadic function to all values flowing downstream (not the bound value as is usual with Map)
method Pipe<RT, A, B, R> mapM <RT, A, B, R> (Func<A, Aff<B>> f) Source #
Apply a monadic function to all values flowing downstream (not the bound value as is usual with Map)
method Pipe<RT, A, B, R> mapM <RT, A, B, R> (Func<A, Eff<RT, B>> f) Source #
Apply a monadic function to all values flowing downstream (not the bound value as is usual with Map)
method Pipe<RT, A, A, Unit> mapM <RT, A> (Func<A, Eff<RT, A>> f) Source #
Apply a monadic function to all values flowing downstream (not the bound value as is usual with Map)
method Pipe<RT, A, B, R> mapM <RT, A, B, R> (Func<A, Eff<B>> f) Source #
Apply a monadic function to all values flowing downstream (not the bound value as is usual with Map)
method Pipe<RT, A, B, R> lift <RT, A, B, R> (Aff<R> ma) Source #
Lift the IO monad into the Pipe monad transformer (a specialism of the Proxy monad transformer)
method Pipe<RT, A, B, R> lift <RT, A, B, R> (Eff<R> ma) Source #
Lift the IO monad into the Pipe monad transformer (a specialism of the Proxy monad transformer)
method Pipe<RT, A, B, R> lift <RT, A, B, R> (Aff<RT, R> ma) Source #
Lift the IO monad into the Pipe monad transformer (a specialism of the Proxy monad transformer)
method Pipe<RT, A, B, R> lift <RT, A, B, R> (Eff<RT, R> ma) Source #
Lift the IO monad into the Pipe monad transformer (a specialism of the Proxy monad transformer)
method Pipe<RT, IN, OUT, R> use <RT, IN, OUT, R> (Aff<R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Pipe<RT, IN, OUT, R> use <RT, IN, OUT, R> (Eff<R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Pipe<RT, IN, OUT, R> use <RT, IN, OUT, R> (Aff<RT, R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Pipe<RT, IN, OUT, R> use <RT, IN, OUT, R> (Eff<RT, R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Pipe<RT, IN, OUT, R> use <RT, IN, OUT, R> (Aff<R> ma, Func<R, Unit> dispose) Source #
Lift am IO monad into the Proxy
monad transformer
method Pipe<RT, IN, OUT, R> use <RT, IN, OUT, R> (Eff<R> ma, Func<R, Unit> dispose) Source #
Lift am IO monad into the Proxy
monad transformer
method Pipe<RT, IN, OUT, R> use <RT, IN, OUT, R> (Aff<RT, R> ma, Func<R, Unit> dispose) Source #
Lift am IO monad into the Proxy
monad transformer
method Pipe<RT, IN, OUT, R> use <RT, IN, OUT, R> (Eff<RT, R> ma, Func<R, Unit> dispose) Source #
Lift am IO monad into the Proxy
monad transformer
method Pipe<RT, IN, OUT, Unit> release <RT, IN, OUT, R> (R dispose) Source #
Release a previously used resource
method Pipe<RT, IN, OUT, Unit> foldWhile <RT, IN, OUT> (OUT Initial, Func<OUT, IN, OUT> Fold, Func<OUT, bool> WhileState) Source #
Folds values coming down-stream, when the predicate returns false the folded value is yielded
param | Initial | Initial state |
param | Fold | Fold operation |
param | WhileState | Predicate |
returns | A pipe that folds |
method Pipe<RT, IN, OUT, Unit> foldUntil <RT, IN, OUT> (OUT Initial, Func<OUT, IN, OUT> Fold, Func<OUT, bool> UntilState) Source #
Folds values coming down-stream, when the predicate returns true the folded value is yielded
param | Initial | Initial state |
param | Fold | Fold operation |
param | UntilState | Predicate |
returns | A pipe that folds |
method Pipe<RT, IN, OUT, Unit> foldWhile <RT, IN, OUT> (OUT Initial, Func<OUT, IN, OUT> Fold, Func<IN, bool> WhileValue) Source #
Folds values coming down-stream, when the predicate returns false the folded value is yielded
param | Initial | Initial state |
param | Fold | Fold operation |
param | WhileValue | Predicate |
returns | A pipe that folds |
method Pipe<RT, IN, OUT, Unit> foldUntil <RT, IN, OUT> (OUT Initial, Func<OUT, IN, OUT> Fold, Func<IN, bool> UntilValue) Source #
Folds values coming down-stream, when the predicate returns true the folded value is yielded
param | Initial | Initial state |
param | Fold | Fold operation |
param | UntilValue | Predicate |
returns | A pipe that folds |