Implement delays for indexes() and values()

This commit is contained in:
centauri 2025-08-31 20:37:46 +01:00
parent 5262ef711c
commit 4b4db9602e
5 changed files with 332 additions and 188 deletions

View file

@ -8,7 +8,10 @@ type Map<K, V> = { [K]: V }
type Source<T> = () -> T
type Component<T> = (Source<boolean>) -> T
local function switch_map<K, Obj>(input: Source<K>, map: Map<K, Component<Obj>>): Source<nil | Obj | Array<Obj>>
local function switch_map<K, Obj>(
input: Source<K>,
map: Map<K, Component<Obj>>
): Source<nil | Obj | Array<Obj>>
local output = source(nil :: nil | Obj | Array<Obj>)
local caches = {} :: Map<K, {