diff --git a/samples/drawer-sample4.lua b/samples/drawer-sample4.lua index 7cdc30a..4836870 100644 --- a/samples/drawer-sample4.lua +++ b/samples/drawer-sample4.lua @@ -8,19 +8,10 @@ function on_drawer_open() end function on_icons_ready(icons) - names = map(pkgs, function(it) return apps:name(it) end) + names = map(function(it) return apps:name(it) end, pkgs) drawer:show_list(names, icons, nil, true) end function on_click(idx) apps:launch(pkgs[idx]) end - -function map(tbl, f) - local ret = {} - for k,v in pairs(tbl) do - ret[k] = f(v) - end - return ret -end -