>>  <<  Ndx  Usr  Pri  Phr  Dic  Rel  Voc  !:  wd  Help  Dictionary

19. Symbolic Functions

For any function, a corresponding symbolic function can be defined to display the expression rather than evaluate it. For example:
   minus=: [ , '-'"_ , ]
   'a' minus 'b'
a-b

   list=: 'abcd'
   table=: 4 4$'ABCDEFGHIJKLMNOP'
   minus/list
a-b-c-d

   (minus/\list);('01'minus"0/list);(minus//.table);table
+-------+---+-------+----+
|a      |0-a|A      |ABCD|
|a-b    |0-b|B-E    |EFGH|
|a-b-c  |0-c|C-F-I  |IJKL|
|a-b-c-d|0-d|D-G-J-M|MNOP|
|       |   |H-K-N  |    |
|       |1-a|L-O    |    |
|       |1-b|P      |    |
|       |1-c|       |    |
|       |1-d|       |    |
+-------+---+-------+----+

   (,.list)=: 4 3 2 1
   (". minus/\list) ,: (-/\4 3 2 1)
4 1 3 2
4 1 3 2

   3 (minus/\ ; minus/\.) 'abcdefg'
+-----+-------+
|a-b-c|d-e-f-g|
|b-c-d|a-e-f-g|
|c-d-e|a-b-f-g|
|d-e-f|a-b-c-g|
|e-f-g|a-b-c-d|
+-----+-------+



>>  <<  Ndx  Usr  Pri  Phr  Dic  Rel  Voc  !:  wd  Help  Dictionary