metamethod
Metamethod is a term used in Lua to describe a special kind of function stored in a metatable that defines or overrides the behavior of operations and other language constructs on values that carry that metatable. Metamethods are not methods of the value itself; they are functions that the Lua runtime can invoke automatically to implement operator overloading and related behavior.
How metamethods work: When Lua evaluates an operation such as addition, indexing, or a function call, it
Common metamethods include __add, __sub, __mul, __div, __mod, __pow, and __unm for arithmetic; __eq, __lt, and __le
Implementation and usage: A metatable is a regular table attached to a value via setmetatable, and metamethod