[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ... as an "expand list" unary postfix operator
- From: TNHarris <telliamed@...>
- Date: Mon, 17 Aug 2009 18:44:52 -0400
On Fri, 14 Aug 2009 00:00:08 -0400
David Manura <dm.lua@math2.org> wrote:
>
> One of the prototypical problems in [1] was to implement a function
> this:
>
> --Wraps a function with trace statements.
> function trace(f)
> return function(...)
> print("begin", f)
> local result = tuple(f(...))
> print("end", f)
> return result()
> end
> end
>
I'd be preferential to the syntax:
-- snip
print("begin", f)
... = f(...)
print("end", f)
return ...
-- snip
-- tom
telliamed@whoopdedo.org