mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Implement delays for indexes() and values()
This commit is contained in:
parent
5262ef711c
commit
4b4db9602e
5 changed files with 332 additions and 188 deletions
|
|
@ -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, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue