swapResult

Compose with swapper.

swapResult
(
F
)
(
F f
)

Examples

auto x = new Maybe!int[4];
auto y = new Maybe!int[4];
auto z = new Maybe!(Tuple!(int, int))[4];
x[0] = 2; x[1] = 3;
y[0] = 5, y[2] = 7;
z[0] = 5.tuple(2);
auto p = IdentityFunction!(Tuple!(Maybe!int, Maybe!int)).get
.swapResult.compose(MaybeTuple!(int, int).get);
foreach (i; 0..4)
	assert (p(x[i].tuple(y[i])).maybeEqual(z[i]));

Meta