thunk
fn
Thunk!T thunk(T)(T delegate() @safe recipe)Construct a thunk, inferring its payload from a delegate.
Parameters
recipe | Zero-argument @safe delegate, retained until evaluation. |
Returns
A pending Thunk sharing state with any future copies.
Throws
InvalidThunkException if the recipe is null.
fn
Thunk!T thunk(T)(T function() @safe recipe)Construct a thunk, inferring its payload from a free function.
Parameters
recipe | Zero-argument @safe function pointer. |
Returns
A pending Thunk.
Throws
InvalidThunkException if the recipe is null.