if not game then script = require "test/wrap-require" end local graph = require(script.Parent.graph) type Node = graph.Node local create = graph.create local set = graph.set type Source = (() -> T) & ((T) -> T) local function source(value: T): Source local node, get_value = create(value :: T) return function(...): T if select("#", ...) == 0 then return get_value() end local v = ... :: T if node.cache == v and type(v) ~= "table" then return v end set(node, v) return v end end return source :: ((value: T) -> Source) & (() -> Source)