-
Struggling to understand two statements
I am studying the official example code from here: https://github.com/kxcontrib/websocket/blob/master/AppendixB/pubsub.q and after thinking for a while I still don’t understand what exactly a few lines do:
trade:flip `time`sym`price`size!"nsfi"$:(); subs:2!flip `handle`func`params!"is*"$:();
The following is the things I already know:
- Q generally read from right to left;
- We assign the results to trade/subs;
- flip is used to transpose an input
- `time `sym are “symbols”
- “nsfi” is used to specify the type of columns
Then here comes the things I don’t know…
- What does $:() do?
- How about the bang between symbols and “nsfi”?
- What does 2!flip mean?..
Thanks!
Log in to reply.