Syntax
comparefunctions(func1: function, func2: function): booleanAliases
comparefunctionArguments
| Name | Type | Description |
|---|---|---|
func1 | function | First function to compare. |
func2 | function | Second function to compare. |
Returns
| Name | Type | Description |
|---|---|---|
equal | boolean | True when both inputs resolve to the same underlying object or function. |
Description
Checks whether two function references point to the same underlying closure.
Call it with 2 parameter(s): func1, func2. The argument table explains which values are required and which ones only refine the behavior.
It returns equal (boolean). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = comparefunctions(function() end, function() end)
print(result)