Vocabulary/Foreigns/5!:7

From J Wiki
Jump to navigation Jump to search

Usage:

valence 5!:7 boxedname

Example use:

   1(5!:7)<'perm'
┌─┬─────────┬───────────────────────────────┐
01 65535 0z=.i.1 0                       
├─┼─────────┼───────────────────────────────┤
117 2 1   for.                           
├─┼─────────┼───────────────────────────────┤
22 65535 1i.y                            
├─┼─────────┼───────────────────────────────┤
318 6 1   do.                            
├─┼─────────┼───────────────────────────────┤
41 65535 1z=.,/(0,.1+z){"2 1\:"1=i.1+{:$z
├─┼─────────┼───────────────────────────────┤
56 3 1    end.                           
└─┴─────────┴───────────────────────────────┘

This example is based on the definition (source code) of perm:

3 :0
z=. i.1 0
for. i.y do. z=. ,/ (0 ,. 1 + z) {"2 1 \:"1 = i. 1 + {: $z end.
:
,/ ({~ perm@#)"1 x comb y
)

The result table has one row for each sentence/control word in the definition.

The first column's box contains the sequential 0-origin index of the sentence/control word,

The second column's box contains three integers:

  1. The control word id
  2. target -- a derived line number whose significance depends on the control word
  3. The 0-origin line number of the line of the explicit definition containing this sentence/control word.

The third column's box contains the sentence/control word itself.