tupleMap

Return a tuple of fun applied to each value of tuple.

tupleMap
(
alias fun
Types...
)
(
in Types values
)

Examples

1 import std.conv : to;
2 import std.typecons : tuple;
3 
4 assert(
5     tupleMap!"2*a"(1, 2, 3.0) ==
6     tuple(2, 4, 6.0)
7 );
8 assert(
9     tupleMap!(x => to!string(x))(1, '2', 3.0) ==
10     tuple("1", "2", "3")
11 );

Meta