Re: about q language

>I am a q language fan in China. I’ve a problem with q programming:

>say I have a table t:(x1:1 2 3;x2:9 8 7)

>and a self-defined function f:{x+y*6}

>I want to apply select some rows from that table t

>and apply function f to each row,with column x1,x2 as inputs.

>eg: select from x where x2>7

>and i got

>1 9

>2 8

>f[1;9],f [2;8]

>55 50

>how should i write this? in one select clause?

q)t:(x1:1 2 3;x2:9 8 7);f:{x+y*6}

q)select x3:f[x1;x2] from t where x2>7

x3

55

50

if your function f is not a vector function, then f’

q)select x3:f’[x1;x2] from t where x2>7

x3

55

50