trMap

Transforms values using the given predicate before passing them to the next layer.

trMap
(
alias pred
R
)
(
auto ref R r
)

Examples

int result;
(2)
	.trOnly
	.trMap!(n => n+1)
	.trMap!(n => n * 2)
	.trEach!((int n) { result = n; });
assert(result == 6);

Meta