ct:{[fields;types] flip fields!types$\:()}
Example:
q)ct[`date`time`sym`price`size`cond;`date`time`symbol`float`long`symbol]
date time sym price size cond
-----------------------------
Will also work with a form of char types:
q)ct[`date`time`sym`price`size`cond;"dtsfjs"]
date time sym price size cond
-----------------------------
source
share