Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uunet.ca!geac!itcyyz!yrloc!hui
From: hui@yrloc.ipsa.reuter.COM (Roger Hui)
Subject: Re: Is hook special
Message-ID: <1992May16.054009.16700@yrloc.ipsa.reuter.COM>
Organization: Iverson Software Inc.
References: <qmdbms.705703600@gsusgi1.gsu.edu> <ROCKWELL.92May12192510@socrates.umd.edu> <qmdbms.705836966@gsusgi1.gsu.edu> <ROCKWELL.92May14082927@socrates.umd.edu>
Date: Sat, 16 May 92 05:40:09 GMT

Brian Schott writes:
> ... I apparently couldn't even see the '@]' suffixed onto several
> verbs (e.g. i.@$@]   a@]#u@]  ) !!! I am not quite clear yet, though.
> 			^^    ^^  ^^
> I have had a difficult time imagining the need for this suffix; I thought
> it was a do-nothing addon, especially for a monadic verb. It appears to be
> preserving some needed rank consistency in the sequence of verbs, but I
> cannot see exactly why. Maybe someone can explain?  ...
 
As Raul Deluth Miller-Rockwell points out in his reply, the dyad f@]
applies f to the right argument.  [, ], @[, and @] are particularly useful
in forks:
 
  x (f g h) y
       g
     /   \       Definition
    f     h
   / \   / \
  x   y x   y
 
x (f@[ g h@]) y
       g                   g                  g
     /   \               /   \              /   \
   f@[   h@]    <-->    f     h    <-->    f     h    <-->  (f x) g (h y)
   / \   / \            |     |            |     |
  x   y x   y           [     ]            x     y
                       / \   / \
                      x   y x   y
 
  x ([ f [ g h) y
       f                   f
     /   \               /   \
    [      g    <-->    x     g    <-->    x f x g x h y
   / \    / \                / \
  x   y  [   h              x   h
	/ \ / \                / \ 
        x y x y               x   y 
 
And so on.

------------------------------------
Roger Hui, Iverson Software Inc., 33 Major Street, Toronto, Ontario  M5S 2K9
Phone: (416) 925 6096;  Fax: (416) 488 7559
