lift2

fnauto lift2(alias fun, T, U)(Thunk!T left, Thunk!U right) if (!is(T == void) && !is(U == void))

Defer a binary transformation, forcing inputs in left-to-right order.

The right input is not forced if the left input fails. This is sequential composition, not parallel scheduling. Both handles are captured by value, retaining their identities, not by borrowing the caller's variables.

Parameters

funAn @safe callable accepting both values; may return void.
leftLeft non-void thunk handle.
rightRight non-void thunk handle.

Returns

A pending thunk with the transformation's payload type.

Throws

Nothing on account of the recipes until forcing; allocation can fail.