seq

The chain operation using functors. Calls all functors in sequence, returns void. (Not to be confused with function composition.)

template seq(Functors...)
@nogc
seq
(
Functors functors
)
if (
allSatisfy!(isFunctor, Functors)
)

Members

Functions

seq
auto seq(Functors functors)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

fun
void fun(Functors functors, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

auto addFive = functor!(p => *p += 5)();
auto addThree = functor!(p => *p += 3)();
auto addEight = seq(addFive, addThree);
int i;
addEight(&i);
assert(i == 8);

Meta