Re: orif
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: orif
- From: Lorenzo Donati <lorenzodonatibz@...>
- Date: 2015年8月15日 12:00:40 +0200
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