考虑
q)-3!1,2
"1 2"
q)-3!1,enlist 2
"1 2"
q)-3!(enlist 1),enlist 2
"1 2"
q)-3!(enlist 1),2
"1 2"
当将列表处理为表示集合的数据结构,然后是集合的集合等时,这变得非常烦人,所以我必须定义
q)app:{(enlist x) , enlist y}
q)-3!app[1;2]
"1 2"
q)-3!app[1;enlist 2]
"(1;,2)"
q)-3!app[enlist 1;enlist 2]
"(,1;,2)"
q)-3!app[enlist 1;2]
"(,1;2)"
它的行为“如预期”(来自静态类型的 pov)。问题是是否存在这样的内置运算符,如果没有,为什么不呢?