This solves the problem of "Lua syntax makes lambdas so painfull to write that you tend to avoid them", but it doesn't solve Enrico's currying issue (
): for that, you need either a specific currying syntax, or a lambda syntax which is right-associative, so takes an _expression_ as its last element. The "end" gets in the way:
\x.\y.\z.(x z) (y z) -- lambda calculus
--metalua--> |x||y||z| x(z)(y(z)) -- associative syntax
--haskell--> \x->\y->\z-> (x z) (y z) -- associative syntax
--ocaml--> fun x y z -> (x z) (y z) (* ad-hoc syntax sugar *)
--risclua--> \(x)=>\(x)=>\(x)=>x(z)(y(z)) end end end -- need to take care of nesting
Unless I missed something, you don't need that final "end" to keep your syntax unambiguous. Moreover, "end" is a block terminator in Lua, not an _expression_ terminator.