ygrek on Nostr: ngn/#k tip of the day - building dict of two lists is straightforward ` !/(`a`b`c;1 2 ...
ngn/#k tip of the day - building dict of two lists is straightforward ` !/(`a`b`c;1 2 3)`, how to do the reverse? growler/k supports pattern matching / destructuring on the dict as so:
```
(k;v):!/(`a`b`c;1 2 3); (k;v)
(`a`b`c
1 2 3)
```
Also anonymous matching works :
```
:(;):`a`b`c!1 2 3
(`a`b`c
1 2 3)
```
Published at
2026-08-24 21:16:36 UTCEvent JSON
{
"id": "0661a99ad530a13b348b4a4713a5e7b2dcf4b94d12df1749fef4098bf05827a1",
"pubkey": "fe046cb4158d2d6133974beb609afaf77e08561daa3ec554c926a6ea2d8e9b8c",
"created_at": 1787606196,
"kind": 1,
"tags": [
[
"t",
"k"
]
],
"content": "ngn/#k tip of the day - building dict of two lists is straightforward ` !/(`a`b`c;1 2 3)`, how to do the reverse? growler/k supports pattern matching / destructuring on the dict as so:\n```\n (k;v):!/(`a`b`c;1 2 3); (k;v)\n(`a`b`c\n 1 2 3)\n```\nAlso anonymous matching works :\n```\n :(;):`a`b`c!1 2 3\n(`a`b`c\n 1 2 3)\n```",
"sig": "cbd876086e29c94ef70295cbbf600b1fd058d206db4a2d39238a1cff0179386f2f673c71aec75b3d2309c8e18dda6fcc12483cd6770f472ebdd7c248c76d342a"
}