lua-users home
lua-l archive

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

Title: RE: converting lua functions to strings

Speaking of functions as first class, is there any reason why the
following doesn't work (I'm using 4.0 alpha):

function(x) return x end ("foo")

I'd have expected it to return foo, but it doesn't parse.
Is it another problem with parser ambiguity ?

(I agree that this example is contrived, but, this weekend, I just
happened to have a case where it was natural to use such a construct,
though I can't remember what it was just now...


Vincent Penquerc'h