Refactor codebase

This commit is contained in:
Aaron Smith 2023-08-22 15:50:03 +01:00
parent 07ae542e28
commit a3f03fd067
15 changed files with 228 additions and 128 deletions

View file

@ -5,11 +5,11 @@ local create = graph.create
local capture_and_link = graph.capture_and_link
local function derive<T>(fn: () -> T): () -> T
local node, node_get = create((nil :: any) :: T)
local node, read_node_value = create((false :: any) :: T)
node.cache = capture_and_link(node, fn)
return node_get
return read_node_value
end
return derive