[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Idea: 'function' keyword optional when preceded by 'local'
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 7 Jul 2011 08:11:03 +0200
On Thu, Jul 7, 2011 at 3:02 AM, Xavier Wang <weasley.wx@gmail.com> wrote:
> I think this kind of thing is great (apart of syntax, just idea):
> local a = |x, y| x + y
I like it too, and Francesco Abbate did it in his GSL shell (Lua
bindings to Gnu Scientific Library) but generally it's not too
popular:
http://lua-users.org/lists/lua-l/2009-12/msg00071.html
I like David M's suggestion of
local f(x,y) = x+y
(memories of Fortran statement functions)
steve d.