[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: callback implementation details..
- From: Eric Tetz <erictetz@...>
- Date: Fri, 17 Oct 2003 16:39:29 -0700 (PDT)
--- Reuben Thomas <email@example.com> wrote:
> No, fix and arg refer to different tables.
Ahhhh... I see what you're doing now. Good idea. It allows the
closure to receive additional arguments when it's called.
However, it won't work as written because in the expression:
f will only receive the first value returned by 'unpack(fix)' and
all the values returned by 'unpack(arg)' For instance, this code:
cb = curry( function(a,b,c) print(a,b,c) end, "a", "b", "d")
a nil nil
a 1 2
Personally I've always found that behavior to be one of Lua's
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search