3

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

Thomas Smyth - Treliant
  • 4,993
  • 6
  • 25
  • 36
tenticon
  • 2,639
  • 4
  • 32
  • 76

1 Answers1

1

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.

effbiae
  • 1,087
  • 1
  • 7
  • 22