q - Application by name

tenticon

In the q for mortals chapter on functions there is a little paragraph on "Application by name":

q)f:{x*x}
q)f[5]
_
q)`f[5]
25
q)`f 5
_
q).my.name.space.f:{2*x}
q)`.my.name.space.f[5]

I don't understand where and why this would be used.

Thanks for the help

effbiae

If we needed to call a function on a remote q server, and all we had was its name, then we could write

h (`.my.ns.function;x;y)

and receive a result - all with a symbol reference.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related