[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Extract a list of keys from table
- From: "steve donovan" <steve.j.donovan@...>
- Date: Fri, 18 Jul 2008 13:08:12 +0200
On Fri, Jul 18, 2008 at 12:32 PM, Shmuel Zeigerman <shmuz@bezeqint.net> wrote:
> While we at it, here's a simpler "function mapper" variant:
> function map(func, ...)
> if select("#", ...) > 0 then
> return func(...), map(func, select(2,...))
> end
> end
Can be a little suprising if the function takes multiple values ;)
> map(print,10,20,30)
10 20 30 20 30 30
steve d.