Skip to content

Instantly share code, notes, and snippets.

@noncom
Last active May 17, 2018 14:19
Show Gist options
  • Save noncom/cd569d74e068ba6490b5767a7d5cfb83 to your computer and use it in GitHub Desktop.
Save noncom/cd569d74e068ba6490b5767a7d5cfb83 to your computer and use it in GitHub Desktop.
{
{
{"fun_1", {args ...}},
{"fun_2", {args ...}},
{"fun_3", {args ...}}
},
{
{"fun_1", {args ...}}, -- params
{"fun_2", {args ...}},
{"fun_3", {args ...}}
},
...
}
{
"sequence" = {"fun_1", "fun_2", "fun_3" ...},
"args" = {
-- step 1 args
{
{a1, a2, ...}, -- fun_1
{a1, a2, ...}, -- fun_2
{a1, a2, ...}, -- fun_3
},
-- step 2 args
{
{a1, a2, ...}, -- fun_1
{a1, a2, ...}, -- fun_2
{a1, a2, ...}, -- fun_3
},
...
}
local fun = params[1] -- "fun_1"
local argz = params[2] -- {args ...}
helper.cached[fun](unpack(argz))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment