thunk

fnThunk!T thunk(T)(T delegate() @safe recipe)

Construct a thunk, inferring its payload from a delegate.

Parameters

recipeZero-argument @safe delegate, retained until evaluation.

Returns

A pending Thunk sharing state with any future copies.

Throws

InvalidThunkException if the recipe is null.
fnThunk!T thunk(T)(T function() @safe recipe)

Construct a thunk, inferring its payload from a free function.

Parameters

recipeZero-argument @safe function pointer.

Returns

A pending Thunk.

Throws

InvalidThunkException if the recipe is null.