9mm/lib/flip.fnl

7 lines
134 B
Plaintext
Raw Normal View History

2024-05-30 01:26:41 +00:00
(fn flip [t]
"takes a table of {key value} and returns a table of {value key}"
(collect [k v (pairs t)] (values v k)))
{: flip}