Browse Source

[Minor] Selectors: Sigh, another try to fix .last

tags/2.3
Vsevolod Stakhov 4 years ago
parent
commit
2398d3465c
1 changed files with 1 additions and 7 deletions
  1. 1
    7
      lualib/lua_selectors/transforms.lua

+ 1
- 7
lualib/lua_selectors/transforms.lua View File

@@ -54,13 +54,7 @@ local transform_function = {
['list'] = true,
},
['process'] = function(inp, t)
local gen,param,state = fun.iter(inp)
local prev_state
repeat
prev_state = state
state = gen(param, state)
until state == nil
return prev_state,pure_type(t)
return fun.nth(fun.length(inp), inp),pure_type(t)
end,
['description'] = 'Returns the last element',
},

Loading…
Cancel
Save