ComposedFunction

Compose two Functions.

  1. class ComposedFunction(A, B, C, D)
  2. auto compose(F f, G g)

Constructors

this
this(Function!(A, B) f, Function!(C, D) g)
Undocumented in source.

Members

Functions

opCall
D opCall(A x)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

f
Function!(A, B) f;
Undocumented in source.
g
Function!(C, D) g;
Undocumented in source.

Examples

auto f = RealFunction!(triple!int).get.compose(RealFunction!(increment!int).get);
auto g = RealFunction!(increment!int).get.compose(RealFunction!(triple!int).get);
assert (f(0) == 1);
assert (f(1) == 4);
assert (g(0) == 3);
assert (g(1) == 6);

Meta