Hi guys
May be missing something obvious here:
But given
q)z:{x[2]}
q)z
2
q)z:{x[2]}
q)z
2
q)z:{x 2}
q)z
2
q)type z
-7h
What gives ? x is not defined anywhere…where is the scalar return type coming from (a nonexistent argument)?
q)x
'x
Cheers
– Rory
Hi guys
May be missing something obvious here:
But given
q)z:{x[2]}
q)z
2
q)z:{x[2]}
q)z
2
q)z:{x 2}
q)z
2
q)type z
-7h
What gives ? x is not defined anywhere…where is the scalar return type coming from (a nonexistent argument)?
q)x
'x
Cheers
– Rory
x in your case is (::) … as you are passing nothing.
so (::) 2 returns 2
The implicit parameter is identity (::)
q)z:{(::)~x}
q)z
1b
q){(::)[2]}
2