9mm/lib/keys.fnl

8 lines
149 B
Fennel

(fn keys [t]
"takes a table returns a sequential list of its keys"
(local out [])
(each [k v (pairs t)] (table.insert out k))
out)
{: keys}