- Consumer
- Pure <A, M, R> (R value)
- awaiting <M, A> ()
- lift <A, M, R> (K<M, R> ma)
- liftIO <A, M, R> (IO<R> ma)
- mapM <A, M, R> (Func<A, K<M, Unit>> f)
- mapM <A, M, R> (Func<A, IO<Unit>> f)
- Consumer <IN, M, A>
- Value
- Consumer (Proxy<Unit, IN, Unit, Void, M, A> value)
- ToProxy ()
- Bind <S> (Func<A, Proxy<Unit, IN, Unit, Void, M, S>> f)
- MapM <B> (Func<K<M, A>, K<M, B>> f)
- ToIO ()
- Bind <B> (Func<A, Consumer<IN, M, B>> f)
- Bind <B> (Func<A, K<M, B>> f)
- Map <S> (Func<A, S> f)
- SelectMany <B, C> (Func<A, Consumer<IN, M, B>> f, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, K<M, B>> f, Func<A, B, C> project)
- Select <B> (Func<A, B> f)
- For <C1, C> (Func<Void, Proxy<Unit, IN, C1, C, M, Unit>> body)
- Action <S> (Proxy<Unit, IN, Unit, Void, M, S> r)
- PairEachRequestWithRespond <UOutA, AUInA> ( Func<Unit, Proxy<UOutA, AUInA, Unit, IN, M, A>> lhs)
- ReplaceRequest <UOutA, AUInA> ( Func<Unit, Proxy<UOutA, AUInA, Unit, Void, M, IN>> lhs)
- PairEachRespondWithRequest <DInC, DOutC> ( Func<Void, Proxy<Unit, Void, DInC, DOutC, M, A>> rhs)
- ReplaceRespond <DInC, DOutC> ( Func<Void, Proxy<Unit, IN, DInC, DOutC, M, Unit>> rhs)
- Reflect ()
- Observe ()
- Deconstruct (out Proxy<Unit, IN, Unit, Void, M, A> value)
- | (IN p1, Consumer<IN, M, A?> p2)
- SelectMany <B, C> (Func<A, Consumer<IN, B>> bind, Func<A, B, C> project)
- & ( Consumer<IN, M, A> lhs, Consumer<IN, M, A> rhs)
- ToString ()
Consumers both can only be awaiting
Upstream | Downstream
+---------+
| |
Unit〈== 〈== Unit
| |
IN ==〉 ==〉Void
| | |
+----|----+
|
A
method Consumer<A, M, A> awaiting <M, A> () Source #
Wait for a value from upstream (whilst in a consumer)
method Consumer<A, M, R> lift <A, M, R> (K<M, R> ma) Source #
Lift the IO monad into the Consumer monad transformer (a specialism of the Proxy monad transformer)
method Consumer<A, M, R> liftIO <A, M, R> (IO<R> ma) Source #
Lift the IO monad into the Consumer monad transformer (a specialism of the Proxy monad transformer)
record Consumer <IN, M, A> Source #
Consumers both can only be awaiting
Upstream | Downstream
+---------+
| |
Unit〈== 〈== Unit
| |
IN ==〉 ==〉Void
| | |
+----|----+
|
A
method Proxy<Unit, IN, Unit, Void, M, 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<Unit, IN, Unit, Void, M, S> Bind <S> (Func<A, Proxy<Unit, IN, Unit, Void, M, 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<Unit, IN, Unit, Void, M, B> MapM <B> (Func<K<M, A>, K<M, B>> f) Source #
Map the lifted monad
type | B | The mapped bound value type |
param | f | The map function |
returns | A new |
method Proxy<Unit, IN, Unit, Void, M, IO<A>> ToIO () Source #
Extract the lifted IO monad (if there is one)
param | f | The map function |
returns | A new |
method Consumer<IN, M, B> Bind <B> (Func<A, Consumer<IN, M, 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 Consumer<IN, M, B> Bind <B> (Func<A, K<M, 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 Proxy<Unit, IN, Unit, Void, M, 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 Consumer<IN, M, C> SelectMany <B, C> (Func<A, Consumer<IN, M, 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 |
method Consumer<IN, M, C> SelectMany <B, C> (Func<A, K<M, 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 |
method Consumer<IN, M, 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<Unit, IN, C1, C, M, A> For <C1, C> (Func<Void, Proxy<Unit, IN, C1, C, M, Unit>> body) Source #
For(body)
loops over the Proxy p
replacing each yield
with body
param | body | Any |
returns | A new |
method Proxy<Unit, IN, Unit, Void, M, S> Action <S> (Proxy<Unit, IN, Unit, Void, M, S> r) Source #
Applicative action
Invokes this Proxy
, then the Proxy r
param | r |
|
method Proxy<UOutA, AUInA, Unit, Void, M, A> PairEachRequestWithRespond <UOutA, AUInA> ( Func<Unit, Proxy<UOutA, AUInA, Unit, IN, M, 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<UOutA, AUInA, Unit, Void, M, A> ReplaceRequest <UOutA, AUInA> ( Func<Unit, Proxy<UOutA, AUInA, Unit, Void, M, 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<Unit, IN, DInC, DOutC, M, A> PairEachRespondWithRequest <DInC, DOutC> ( Func<Void, Proxy<Unit, Void, DInC, DOutC, M, 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<Unit, IN, DInC, DOutC, M, A> ReplaceRespond <DInC, DOutC> ( Func<Void, Proxy<Unit, IN, DInC, DOutC, M, 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<Void, Unit, IN, Unit, M, A> Reflect () Source #
Reverse the arrows of the Proxy
to find its dual.
returns | The dual of |
method Proxy<Unit, IN, Unit, Void, M, 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<Unit, IN, Unit, Void, M, A> value) Source #
method Consumer<IN, M, C> SelectMany <B, C> (Func<A, Consumer<IN, 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 |