Curious about this function design

Dear All,

Thank you for your time.

I try to study the code on this website (http://eachright.blogspot.ch/2007/05/back-testing-in-q.html) which reveals a way to backtest a strategy.

Code is below:

As you can see in the sixth line there are f_u and f_l function definition. I am confused here.

Let have a look on f_u definition: 

f_u:{[xe;limit;p;x]limit&x+xe>p x};

But when the function has been used, it only has three arguments other than four arguments like this:

f_u[(e_pr+gep);i_te;t`bid1]/[i_eb];

May some one explain it to me? Thank you very much!

Best Regards,

Wenhao SHE

Wenhao,

f_u[(e_pr+gep);i_te;t`bid1] is a projection which takes a single argument (monadic function)

This monadic function is then being executed with the over adverb “/” recursively over?i_eb.

See scan and over adverb at code.kx:

?http://code.kx.com/wiki/Reference/Slash#over?

Regards,

Nathan

Thank you very much for your replay, Nathan,

It solved my problem and hope you have a nice day. Thank you for the link as well~~~