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

# comparefunctions

> 두 function values를 function identity로 비교합니다. 두 arguments는 모두 functions여야 합니다. 이 function은 function identity(L, 1) == function identity(L, 2)의 boolean result를 반환합니다. function bytecode, source, behavior, hashes, upvalues 또는 newcclosure mappings는 비교하지 않습니다. comparefunction은 같은 function의 alias입니다.

<div className="real-function-page">
  ```lua theme={null}
  comparefunctions(func1: function, func2: function): boolean
  ```

  ## 별칭

  * `comparefunction`

  ## 인수

  <ParamField path={"func1"} type={"function"} required>
    function identity로 변환되는 first function value입니다.
  </ParamField>

  <ParamField path={"func2"} type={"function"} required>
    function identity로 변환되는 second function value입니다.
  </ParamField>

  ## 반환값

  <ResponseField name={"equal"} type={"boolean"}>
    두 function values가 동일한 function identity로 resolve되면 true, 그렇지 않으면 false입니다.
  </ResponseField>

  ## 예제

  Compare two functions by their function identity.

  ```lua theme={null}
  local function sample()
      return "ok"
  end

  local same = comparefunctions(sample, sample)
  print(same)
  ```
</div>
