[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: callback implementation details..
- From: Eric Tetz <erictetz@...>
- Date: Fri, 17 Oct 2003 16:04:57 -0700 (PDT)
--- Reuben Thomas wrote:
> Yes, curry is simply:
>
> function curry (f, ...)
> local fix = arg
> return function (...)
> return f (unpack (fix), unpack (arg))
> end
> end
You don't need the 'fix', because a unique table is passed in every
time the function is called:
function curry (f, ...)
return function (...)
return f (unpack(arg))
end
end
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com