lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tuesday, June 03, 2014 08:09:18 AM David Demelier wrote:
> What's the use case of this ?

I think I know whence it comes[1]. But the real trick will be finding a way to 
implement __add for numbers.

The add1 function is so obvious I hate that I didn't think of it myself. 
increment1 is quite clever as well. Now if this were Lua 5.3 though, you could 
do some tricks with bit operations.

[1] http://codegolf.stackexchange.com/questions/28786/write-a-program-that-makes-2-2-5

-- 
tom <telliamed@whoopdedo.org>