MapTuple

Creates a generic tuple comprised of results of applying unary template Func to elemetns of A consecutively.

Members

Aliases

FuncTemplate
alias FuncTemplate = UnaryTemplate!Func
Undocumented in source.
MapTuple
alias MapTuple = GenericTuple!(FuncTemplate!(A[0]), MapTuple!(FuncTemplate, A[1..$]))
Undocumented in source.
MapTuple
alias MapTuple = GenericTuple!()
Undocumented in source.

Examples

alias squares = MapTuple!(`a * a`, iotaTuple!4);
static assert(squares == expressionTuple!(0, 1, 4, 9));

static assert(is(MapTuple!(`T[]`, int, long) == TypeTuple!(int[], long[])));

Analog of $(STDREF algorithm, map) for generic tuples except Func can return any count of elements.

Meta