title: call function with multiple value kdb\q
body: <p>I have a function declaration: </p>
  
  <pre><code>func:{[id;time] select last synp from synp_t where instr_id = id, tp_time &lt; time}
  </code></pre>
  
  <p>where <code>instr_id</code> has type <code>i</code> and <code>tp_time</code> has type <code>v</code>.</p>
  
  <p>For example, <code>func[8;05:00:11]</code> works fine and gives me value <code>17.55</code>.</p>
  
  <p>However, if I try <code>func[8 1;05:00:11 07:10:59]</code>, I get:</p>
  
  <pre><code>'length ERROR: incompatible lengths (different lengths of operands for synchronized operation or table columns lengths are not the same
  </code></pre>
  
  <p>What I want to get is, for example, <code>17.55 9.66</code>.</p>
  
  <p>Same error will pop up as well if I do <code>select res:func_demo[id;time]from tab</code>, where <code>tab</code> is table with two column of <code>instr_id</code> and <code>tp_time</code>.</p>
  
  <p>I guess <code>enlist</code> could possibly resolve the problem, but I don't know exactly how to use it. How could I fix this issue?</p>