adjoin

Takes multiple functions and adjoins them together. The result is a RefTuple with one element per passed-in function. Upon invocation, the returned tuple is the adjoined results of all functions. Note: In the special case where only a single function is provided (F.length == 1), adjoin simply aliases to the single passed function (F[0]).

  1. auto adjoin(Args args)
    template adjoin(fun...)
    static if(fun.length != 1)
    static if(Filter!(_needNary, fun).length == 0)
    adjoin
    (
    Args...
    )
    (
    auto ref Args args
    )
    if (
    fun.length &&
    fun.length <= 26
    )
  2. alias adjoin = .adjoin!(staticMap!(naryFun, fun))
  3. alias adjoin = naryFun!(fun[0])

Members

Aliases

adjoin
alias adjoin = naryFun!(fun[0])
Undocumented in source.
adjoin
alias adjoin = .adjoin!(staticMap!(naryFun, fun))
Undocumented in source.

Functions

adjoin
auto adjoin(Args args)

Examples

static bool f1(int a) { return a != 0; }
static int f2(int a) { return a / 2; }
auto x = adjoin!(f1, f2)(5);
assert(is(typeof(x) == RefTuple!(bool, int)));
assert(x.a == true && x.b == 2);

Meta