newlclosure

Wraps a function in a Luau closure.

Syntax

Signature
newlclosure(Function: function) -> function

Aliases

This function has no aliases.

Parameters

ParameterTypeDescription
FunctionfunctionFunction called by the forwarding closure.

Returns

TypeDescription
functionNew Luau closure.

Notes

Function may be a Luau or C closure.

Example

Luau
local Result = newlclosure(function() return 42 end)
print(Result)