[d=:i. 3 3
[e=:(_.$~(20, {.@:$@:])) d
[f=:({.@:]) d
[g=:(|:@:]) d
( g f } e) d
g f } e NB. ok
20 ( g f } (_.$~([, {.@:$@:]))) d NB. ok
NB. substituting g or f will fail
20 ( g ({.@:]) } (_.$~([, {.@:$@:]))) d
NB. finally I re-found that entry I remember reading on amend
NB. so it isn't possible to use [ and ] to the left of }
NB. similar to Henry's example from
http://www.jsoftware.com/help/jforc/explicit-to-tacit_converter.htm
a =. 13 : 'x 0:`[`]} y'
3 a 1 1 1 1 1 1 1 1 1
NB. my exotic version doesn't work either (gee that was a surprise)
NB. why was that ray of light was so fleeting?
v =. 13 : 'x (|:@:])`({.@:])`(_.$~(20, {.(@:$@:])} y'
20 v d
|syntax error: v
| x(|:@:])`({.@:])`(_.$~(20,{.( @:$@:])}y
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm