[comp.lang.apl] Trees for Hook, Fork, Compose, Atop, Dual

ljdickey@watmath.waterloo.edu (L.J.Dickey) (06/12/91)

In article <1991Jun9.125549.4554@watmath.waterloo.edu> I wrote:
>
>I am learning more about the power of J, in particular, more about the
>various compositions of functions that J makes easy, and it has helped
>me to have at hand a page showing DAGs (Directed Acyclic Graphs) of
>some of these.
>
>It was a recent posting by Raul Rockwell about the difference between
>f : '' and f@], and that prompted me to think that you, gentle reader,
>might find these diagrams helpful, too.  So, included below is an ascii
>representation of my chart.  If you find this helpful, then I am pleased.


A kind reader has pointed out that there were certain errors and 
omissions, so I take this opportunity to post again, in the hopes of
making it right.  It was also pointed out that these Directed Acyclic
Graphs (DAGs) were Trees, so Trees they are.

Lee Dickey

  |%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%|
  |%|                                |%|                                |%|
  |%|                                |%|                                |%|
  |%|             FORK               |%|             HOOK               |%|
  |%|             f g h              |%|             f g                |%|
  |%|                                |%|                                |%|
  |%|   (f g h) y      x (f g h) y   |%|    (f g) y        x (f g) y    |%|
  |%|                                |%|                                |%|
  |%|       g              g         |%|       f               f        |%|
  |%|      / \           /   \       |%|      / \             / \       |%|
  |%|     f   h         f      h     |%|     y   g           x   g      |%|
  |%|     |   |        / \    / \    |%|         |               |      |%|
  |%|     y   y       x   y  x   y   |%|         y               y      |%|
  |%|                                |%|                                |%|
  |%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%|
  |%|                                |%|                                |%|
  |%|                                |%|                                |%|
  |%|             ATOP               |%|            COMPOSE             |%|
  |%|             f @ g              |%|             f & g              |%|
  |%|                                |%|                                |%|
  |%|   (f @ g) y      x (f @ g) y   |%|   (f & g ) y     x (f & g) y   |%|
  |%|                                |%|                                |%|
  |%|      f               f         |%|       f               f        |%|
  |%|      |               |         |%|       |              / \       |%|
  |%|      g               g         |%|       g             g   g      |%|
  |%|      |              / \        |%|       |             |   |      |%|
  |%|      y             x   y       |%|       y             x   y      |%|
  |%|                                |%|                                |%|
  |%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%|
  |%|                                |%|
  |%|                                |%|
  |%|             DUAL               |%|
  |%|             f&.g               |%|
  |%|         (g^:_1) @ (f&g)        |%|
  |%|                                |%|
  |%|   (f&.g) y        x (f&.g) g   |%|
  |%|                                |%|
  |%|    g^:_1            g^:_1      |%|
  |%|      |                |        |%|
  |%|      f                f        |%|
  |%|      |               / \       |%|
  |%|      g              g   g      |%|
  |%|      |              |   |      |%|
  |%|      y              x   y      |%|
  |%|                                |%|
  |%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%|