lua-users home
lua-l archive

Re: orif

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


On 16/08/2015 01:03, Sean Conner wrote:
It was thus said that the Great Lorenzo Donati once stated:
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!)
 I know you probably understand what I meant, but just to make things
clear, when I said "pick your poison" I meant "pick one of GPL, LGPL, MIT or
BSD."
 -spc (Glad you liked it)
Yep! :-)

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