ForeverDev

Untitled

Nov 6th, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.30 KB | None | 0 0
  1. _=setmetatable({},{
  2.     __call=function()end,
  3.     __pow=function(s,_)
  4.         getfenv()[_[1]]=type(_[2])=="function"and(setmetatable({_[2]},{__index=function(___,__)___[1](unpack(__))end}))or(_[2])
  5.     end
  6. })
  7.  
  8. _(_^{"sum",function(...)_(_^{"x",0})for i=1,#({...})do x=x+({...})[i]end print(x)end})
  9. _(sum[{5,10,15}])
Advertisement
Add Comment
Please, Sign In to add comment