Yes Tom, it makes sense as you describe it - you appear to have the gist of this.

The complexity does increase quickly with the length of the verb trains, and many members of this forum appear to have mastered their readability instantly (I still need to think !). The gurus here seem to be able to just analyse the train itself. I find I need to consider data by example to fully understand it (and always remember to break it down and experiment).

Note that 1: and 2: as verbs returning the constant 1 and 2 respectively are an artifact of an earlier version of J. The same can now be achieved for constants without the : as in ...

odds =: 1 + 2 * i.

which achieves the same thing.

The nesting of verb trains is clear in this example also, read it as a higher order fork of 3 verbs ...
     1      +     (2 * i.)
     f       g          h

where h is itself a fork of 3 verbs (2 * i.). Hooks can be understood the same way, so (f g h i) can be read as (f (g h i)), which is a hook (2 verbs) the 2nd of which is a fork (3 verbs).

So now you can also see this result:
     (- % + -) 3                           NB. 3 - ((%3) + (-3))
5.66666666667

Again these can all be best understood with examples. And given you have the basics here I would highly recommend Henry's book as John suggested to gain a complete understanding.

Thanks for the feedback, I will try to follow up (not good at this !).../Rob Hodgkinson

PS: Another tip to help learn in case you missed it ... type in an expression, place the cursor on a verb you don't understand, press Ctrl-F1 to bring up browser help on that verb from the dictionary (if on a Mac you have to use <fn-Command-F1>.

On 15/11/2008, at 4:21 PM, List wrote:


Does any of the above make any sense?

Tom



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to