how does 'each' work

Why is each not working in this case?

t:(b:sgas`a;c:30 10 43 13 24;g:til 5)

{p:select g from t where c=x; process(p,x)} each (10;30);

Is this the correct syntax and usage of each? I basically want to execute a set of statements for each value on the right.

what doesn’t work?

process (p,x) is the same as process p,x. It is not process[p;x].

q)process:{0N!x}

q){p:select g from t where c=x; process(p,x)} each (10;30);

((,`g)!,1;10)

((,`g)!,0;30)