Re: Function as metatable (metafunctions?)
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Function as metatable (metafunctions?)
- From: Petite Abeille <petite.abeille@...>
- Date: 2014年3月31日 19:14:19 +0200
On Mar 31, 2014, at 2:57 AM, Thiago L. <fakedme@gmail.com> wrote:
> I mean I can't set __metatable to a function so…
Eh?
local aFunction = function() end
debug.setmetatable( aFunction, { __tostring = function() return 'm e t a f u n c t i o n' end } )
print( aFunction )