>>28
The problem here is that your example isn't good. In it, there's not actually any variable functionality, just variable strings. This is obvious in the Lua example where all the functions are anonymous and follow a common pattern. For instance, you could implement the lua thing with:
local printy =
{
Lua = merki,
Is = derpity,
Fun = dipity,
["Is it Not?"] = "dooooo"
}
function woop(value)
print(
(printy[value] or "Go have fun with yourself.")
.." "..value)
end
because there's no variation on the fact that the thing is printing and concatenating.
Remember, what you want to do is describe -out- patterns, not describe -in- patterns.