[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Self-awareness of functions?
- From: Steve Litt <slitt@...>
- Date: Wed, 29 Dec 2010 09:52:31 -0500
On Wednesday 29 December 2010 05:19:14 Dirk Laurie wrote:
> So let me rephrase the point in short sentences.
>
> 1. The construction "function(x) ... end" defines an anonymous function.
> 2. "function foo(x)" instead of "foo=function(x)" is mere syntactic sugar.
> You are actually doing the same thing.
Hi Dirk,
According to this page:
http://www.lua.org/pil/6.2.html
According to that page, there's a subtle difference between
foo=function(x)
and
function foo(x)
when it comes to declaring recursive functions. I'm not saying this has
anything to do with your situation, I'm just pointing out that in certain
situations they're not identical.
SteveT
Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt