lua-users home
lua-l archive

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


>> One other annoyance is that you can't directly apply an anonymous function:
>> 
>> (function (x) print(x) end) "hello"
>
>You can write «Id(function (x) print(x) end) "hello"» (where Id is the
>identity function), but I agree this is a little inconvenient.
>

Or
	do
	 local f=function (x) print(x) end
	 f"hello"
	end

which is not convenient either, but perhaps is clearer.
--lhf