[Jprogramming] @: and capped fork

km km at math.uh.edu
Thu Nov 29 17:57:00 UTC 2012


Here is a comment from Chapter 40 of J for C Programmers:

The verb [:, which we met as a way to cause an error, has a special meaning in a fork.  As the leftmost verb of the fork, [: means 'ignore the left branch'.  So, Nx ([: V1 V2) Ny is V1 Nx V2 Ny and ([: V1 V2) Ny is V1 V2 Ny .  In both cases, ([: V1 V2) is equivalent toV1@:V2 .  Almost always, the choice between one form or the other is a matter of taste.  Do not fear that the extra word in the fork leads to slower execution; the [: is not executed--it is recognized by the parser when it creates the anonymous verb for the fork.


Kip Murray
Sent from my iPad


On Nov 29, 2012, at 11:38 AM, Ian Clark <earthspotty at gmail.com> wrote:

> Thanks Dan.
> 
> What I'm hearing reassures me.
> 
> I'm in the final testing phase of an explication utility. It assumes
> the production:   ([: f g) ==>  f@:(g)  . I just had a panic attack
> and wondered if (and whereabouts) this was guaranteed.
> 
> IanClark
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm


More information about the Programming mailing list