lua-users home
lua-l archive

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


> >It might be a good idea to at least fix the standard library in this
> >respect, either completely removing the type checking from
> >table.foreach
> >and others, or implementing a generic checking mechanism.
[...]
> local function callable_to_function(callable)
[...]

Cool! I never thought about doing that in pure Lua. I've added
the example in my blog, with the usual credits.

OTOH, notice that neither your solution nor mine change the fact
that it'd be nice if the standard library accepted callables
without this hack.

-- 
Gustavo Niemeyer
http://niemeyer.net