Index   <<   >>

Lay it on the table
/

Tables are formed in J using the dyad of f/ , that is,

   x f/ y

produces the result that in APL would be given by

   x ∘ . f y

Let f be the verb 3+2x-y2, that is,

   f=.3: + +:@[ - *:@]
   2 f 3
_2
   3 f 2
5
   ]x=._5+i.11
_5 _4 _3 _2 _1 0 1 2 3 4 5
   x by x over x f"0/x
┌──┬────────────────────────────────────────┐
│  │ _5  _4  _3  _2 _1  0  1   2   3   4   5│
├──┼────────────────────────────────────────┤
│_5│_32 _23 _16 _11 _8 _7 _8 _11 _16 _23 _32│
│_4│_30 _21 _14  _9 _6 _5 _6  _9 _14 _21 _30│
│_3│_28 _19 _12  _7 _4 _3 _4  _7 _12 _19 _28│
│_2│_26 _17 _10  _5 _2 _1 _2  _5 _10 _17 _26│
│_1│_24 _15  _8  _3  0  1  0  _3  _8 _15 _24│
│ 0│_22 _13  _6  _1  2  3  2  _1  _6 _13 _22│
│ 1│_20 _11  _4   1  4  5  4   1  _4 _11 _20│
│ 2│_18  _9  _2   3  6  7  6   3  _2  _9 _18│
│ 3│_16  _7   0   5  8  9  8   5   0  _7 _16│
│ 4│_14  _5   2   7 10 11 10   7   2  _5 _14│
│ 5│_12  _3   4   9 12 13 12   9   4  _3 _12│
└──┴────────────────────────────────────────┘

See the sheets headed No end in sight and Looking backward for other interesting tables.

   by=.' '&;@,.@[,.]
   over=.({.;}.)@":@,