将动词应用于特定索引处的盒装列表的内容

Apply a verb to the contents of a boxed list at a specific index

考虑:

   [xs=. 'hi';'hello';'foo'
┌──┬─────┬───┐
│hi│hello│foo│
└──┴─────┴───┘

我寻求 默认 连词 adjust 这样:

(,&' world' adjust 1) xs

产生:

┌──┬───────────┬───┐
│hi│hello world│foo│
└──┴───────────┴───┘

如果其他方法更适合这个问题,我也愿意接受。

我确实采用了不同的方法来创建结果,使用动词参数而不是连词。我能够使参数相对可调,以便在不改变结构的情况下轻松操作它们。我通过创建一个二元动词来做到这一点,其中要选择的框是左参数,框列表是左参数,要添加的后缀嵌入在动词中。

   suffix=.''&;
   1 (] ,each (suffix ' world') {~ (= i.@#)) xs
+--+-----------+---+
|hi|hello world|foo|
+--+-----------+---+
   2 (] ,each (suffix 'die') {~ (= i.@#)) xs
+--+-----+------+
|hi|hello|foodie|
+--+-----+------+
   0 (] ,each (suffix ' there') {~ (= i.@#)) xs
+--------+-----+---+
|hi there|hello|foo|
+--------+-----+---+

完全原始的默认版本可能是这样的。

   0 (] ,each ('';' there') {~ (= i.@#)) xs
+--------+-----+---+
|hi there|hello|foo|
+--------+-----+---+