public abstract class FnChain<I,O> extends Object implements Fn<I,O>
Fns
, where the result of the
first is passed as argument to the second.
g(ƒ(x))
Modifier and Type | Field and Description |
---|---|
Do<I> |
asDo
This chain, typed as a
Do (sideeffect). |
Modifier and Type | Method and Description |
---|---|
static <I,O> FnChain<I,O> |
chain(Fn<I,O> first) |
abstract FnChain<I,O> |
then(Do<? super O> sideeffect)
|
abstract <Y> FnChain<I,Y> |
then(Fn<? super O,Y> next)
Append a function to the chain.
|
public abstract <Y> FnChain<I,Y> then(Fn<? super O,Y> next)
next
- The next function.public abstract FnChain<I,O> then(Do<? super O> sideeffect)
Do
(sideeffect) on the output from the last Fn
in the chain.
The chain may still be chained with further Fn
s or Do
s. The chain
yields the result from the last Fn
as usual, after it has been passed to the given
Do
. If you need the resulting chain as a Do
, use asDo
.sideeffect
- The Do
to apply on the output from the last Fn
in the chain.Copyright © 2016. All Rights Reserved.