Closuresclonefunction
Closures

clonefunction

Creates an independent function with the same behavior and environment.

Related to sUNC documentation

This page follows the official sUNC reference.

Signature

Luau
function clonefunction<A..., R...>(functionToClone: (A...) -> R...): (A...) -> R...

Returns

The cloned function.