lua-users home
lua-l archive

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


Ah, so there is a whole function there behind the
scenes.  I was thinking to myself, "(){,} sure does a
lot in Lua".  The function is very clear and
understandable.

Thanks,

McKinley

--- Asko Kauppi <askok@dnainternet.net> wrote:
> -- This func needed by the token filter
> _G["?"]= function( cond )
>    return function(tbl)
>              assert( tbl, "Usage: ? cond {
> true_choice,  
> false_choice }" )
>              if cond then return tbl[1]
>              else         return tbl[2]
>              end
>           end
> end
> 
> I have no experience on Lisp/Scheme macros, leaving
> that for others  
> to answer (see Lua list archives..)




 
____________________________________________________________________________________
Sponsored Link

$200,000 mortgage for $660/mo - 30/15 yr fixed, reduce debt, home equity - 
Click now for info http://yahoo.ratemarketplace.com