vector = {} vector["norm1"] = function (x, y) return (x^2 + y^2)^(1/2) end vector["norm2"] = function (x, y) return math.abs(x) + math.abs(y) end print(vector["norm1"](2.3, 4.1)) print(vector["norm2"](2.3, 4.1))