This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- copy.lua | |
-- | |
-- Functions of varying complexity levels to achieve | |
-- a deep copy in Lua. | |
-- | |
-- 1. The Problem. | |
-- | |
-- Here's an example to see why deep copies are useful. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- perf | |
local sgmatch = string.gmatch | |
-- init Simple and set routes | |
local Simple = {} | |
function Simple:new(request) | |
local instance = { | |
route_name = 'Simple', |