Help / Release / J 5.01 / 128!:2 Apply Implemented

From J Wiki
Jump to navigation Jump to search


>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help Release



128!:2 Implements Apply

initial writing: 2002-05-25
last updated: 2004-10-26


x 128!:2 y applies the verb in string x to y . For example:

   '+/' 128!:2 i.2 5
5 7 9 11 13
   '+/' 128!:2"1 i.2 5
10 35
   '+/"1' 128!:2 i.2 5
10 35
   ('+/';'|.';'|."1') 128!:2&.><i.2 5
+-----------+---------+---------+
|5 7 9 11 13|5 6 7 8 9|4 3 2 1 0|
|           |0 1 2 3 4|9 8 7 6 5|
+-----------+---------+---------+

   '2 3' 128!:2 i.2 5
|syntax error
|   '2 3'    128!:2 i.2 5

   '@' 128!:2 i.2 5
|syntax error
|   '@'    128!:2 i.2 5

The ranks of 128!:2 are 1 _ , that is, apply the lists in the left argument to the right argument in toto.





>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help Release