Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transform a kdb dictionary into a list

given a dictionary that looks like this:

`a`b`c!((0;3); (1;4); enlist 2)

I'd like to find an elegant way to get the following list as a result: 

`a (index 0)
`b (index 1)
`c (index 2)
`a (index 3)
`b (index 4)
like image 704
kkudi Avatar asked Sep 12 '26 08:09

kkudi


1 Answers

One more fast, short solution:

q)where[count each d]iasc raze d
`a`b`c`a`b
like image 58
cillianreilly Avatar answered Sep 14 '26 15:09

cillianreilly



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!