Dear All,
Could you please help me explain the meaning (3#,:)
I understand “3#” is taking 3 elements and “,” is to join
but don’t understand the “:” here.
and don’t understand the meaning of (3#,:)
q)z
“abcde”
“fghij”
q)(3#,:)z
“abcde” “fghij”
“abcde” “fghij”
“abcde” “fghij”
I just found ,: means Amend At.
but still a little difficult to understand the result
I’ve understood the problem:)
but I cannot recall my post, sorry if bother you.
This is implicit composition ('). You can see this from the parse tree:
q)parse “(3#,:)” ’ (#;3) ,:
In k, the expression ,: corresponds to enlist. This construct is the same as repetition (*) in Python.
See: https://code.kx.com/q/ref/compose/