comparefunctions Synchronous
comparefunction
Compare two functions by their underlying callable definition and captured references rather than by table-style identity alone. This helps check whether a wrapper or clone still represents the same behavior.
Luau
comparefunctions(first: Function, second: Function) -> booleanParameters
| Parameter | Type | Description |
|---|---|---|
first | Function | First function. |
second | Function | Second function. |
Returns
booleantrue when Kawaii considers the callables equivalent; otherwise false.
Example
Luau
local original = function(value) return value end
local copy = clonefunction(original)
print(comparefunctions(original, copy))