> ## Documentation Index
> Fetch the complete documentation index at: https://docsuncv2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# newlclosure

Wraps a C closure in a Lua closure wrapper.

```luau theme={null}
newlclosure(func: function): function
```

## Parameters

| Parameter | Type       | Description                     |
| --------- | ---------- | ------------------------------- |
| `func`    | `function` | The C closure function to wrap. |

## Returns

`function` - The wrapped Lua closure function.

## Example

<CodeGroup>
  ```luau Example 1 theme={null}
  local l = newlclosure(print)
  print(islclosure(l)) -- true
  ```

  ```luau Example 2 theme={null}
  local myPrint = newlclosure(getgenv().print)
  ```
</CodeGroup>

<Tip>
  Allows treating C functions as standard Lua closures.
</Tip>
