When reducing over a vector, using a tacit function for the reduction is robust enough to deal with the empty case:
+/⍬
0
But when using a dfn, and trying to use ⍺ or ⍵ directly, APL doesn't like it:
{⍺+⍵}/⍳0
DOMAIN ERROR
{⍺+⍵}/⍳0
∧
I'm trying to join an array of words with space as a delimiter, using reduce. When using a dfn it works as expected, but again, except for the empty vector case:
⊃{⍺,' ',⍵}/'hello' 'world'
hello world
⊃{⍺,' ',⍵}/''
DOMAIN ERROR
⊃{⍺,' ',⍵}/''
∧
I assume that if I use a tacit form, it will take care of the empty vector case, but I'm not sure how to write suc…