Skip to content

Instantly share code, notes, and snippets.

View hayrullinmar's full-sized avatar
🏠
Working from home

Octa hayrullinmar

🏠
Working from home
View GitHub Profile
@TannerRogalsky
TannerRogalsky / set.lua
Last active June 21, 2020 04:46
A simple set implementation in lua
local Set = {}
function Set.new()
local reverse = {}
local set = {}
return setmetatable(set, {
__index = {
insert = function(set, value)
if not reverse[value] then
table.insert(set, value)