I believe f @: g and [: f g give the same results. There are syntactic differences because @: is a conjunction. For example x f @: g y and x ([: f g) y are OK, but x [: f g y gives an error.

For information on forks (f g h) see Section 5 of the Introduction part of the Dictionary and Section II.F of the Dictionary part (in particular CAPPED FORK in Section II.F). (After F1 for Help, click on Dic). For information on [: and @: try their Vocabulary entries (after F1 for Help, click on Voc). (You probably know about F1 etc, but you are talking to a former teacher.)

Kip Murray


Steven Taylor wrote:
So instead of x (* + %@:]) y <-----> x * y + x % y

we get x (* + %@:]) y <-----> x * y + % x ] y

So in a sense, when ] is rightmost it steals the chance to fork, and % is
locked to monad due to the verb verb combination?

BTW:

this was exactly the sort of thing I was looking for...
3 (* + [: % ]) 2


or is it... hmmm... but if % was exectured monadically twice, I would have
expected the answer 7.
   3 (* + [: % ] + [: % ]) 2
6.4

Looks like I need more insight into 'context' and 'J parsing'.  I can
religiously avoid constructs like this and be content to be a poorer
being/scripter/oo/procedural person.  I thought I was on the cusp of fully
understanding verb trains, forks, and hooks..
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to