How to pass arguments to a function (Q/KDB+)?

1.1k views Asked by At

Say I have a function:

quotes:{[ticker;x;y]
output: ....
}

How can I use this function iterate over a list in another function:

combiner:{[tickerList;x;y]
output: uj quotes[ticker1;x;y], quotes[ticker2;x;y], etc.
}
1

There are 1 answers

0
Thomas Smyth - Treliant On BEST ANSWER

You can combine uj with over / to do this:

uj/[list of tables]

In you case this may look like:

uj/[quotes[;x;y]each tickerList]

If the quotes function always outputs tables with the same schema you can use raze instead:

raze quotes[;x;y]each tickerList

raze and uj are both join functions and an implementation of , but raze requires the schema of all tables to be the same.