lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Alexander Gladysh wrote:
I wonder, however, how much slower it would be against the generated
code version...

Benchmark both of them! :)

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

--
Shmuel