lua-users home
lua-l archive

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


> or... use a filter:
[snip snip
>    local function self(k, ...)
>        saved_key = k
>        return ...
>    end

That should probably be:

    local function self(k, ...)
        saved_key = k
        if k ~= nil then
            return ...
        end
    end

Bye,
Wim

>    return function(s, k)
>        return self(f(s, saved_key or k))
>    end
> end
>
> t = {
>  aap = "noot",
>  mies = "vuur",
>  wim = "jet",
> }
>
> for x in seq(pairs(t)) (value) do
>  print(x)
> end
>
> Bye,
> Wim
>