lua-users home
lua-l archive

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


> match k
>   with 10, 11 then return 1 end
>   with 12 then return 2 end
>   with i if 13<=i and i<=16 then return 4 end
> end


Doesn't this work just as well?

return ( k==10 and 1 )
    or ( k==11 and 1 )
    or ( k==12 and 2 )
    or ( k==i  and 13<=i and i<=16 and 4 )



 - Jeff