lua-users home
lua-l archive

Re: orif

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


On 15/08/2015 02:05, Sean Conner wrote:
[snip]
 Here's a better (smaller, faster) function that does the same thing:
	-- --------------------------------------------------
	-- License: GPL, LGPL, MIT, BSD. Pick your poison.
	-- --------------------------------------------------
	function switch(key,case,otherwise)
	 return (key[case] or otherwise or function() return nil end)(case,key)
	end
 -spc
Cool!
BTW, I'd love to see the text of the "Pick your poison" license.
:-D
(I couldn't resist!)
Cheers!
-- Lorenzo

AltStyle によって変換されたページ (->オリジナル) /