Newsgroups: comp.lang.apl
Path: watmath!watserv1!torn!utcsri!rpi!zaphod.mps.ohio-state.edu!uunet.ca!geac!itcyyz!yrloc!hui
From: hui@yrloc.ipsa.reuter.COM (Roger Hui)
Subject: Re: J gerund question
Message-ID: <1992Jul26.214859.2366@yrloc.ipsa.reuter.COM>
Organization: Iverson Software Inc.
References: <qmdbms.711661630@gsusgi1.gsu.edu>
Date: Sun, 26 Jul 92 21:48:59 GMT
Lines: 21


Brian Schott writes:
 
> I have an array of constants shaped 15 3 and I have 3 monadic verbs
> which I want to apply to each item of the array.  I want the result
> to be a 15 3 shaped array.  For example if the verbs were +, -, and *
> then I would expect to make a gerund of them such as + ` - ` * .
> Then if the array is a =. i. 15 3, I want the result to be
>   0  _1  1
>   3  _4  1
>   6  _7  1
>    ...
 
The method that Raul Deluth Miller-Rockwell described is one way to do this.
E.E. McDonnell suggests  (<0 2)|:(+`-`*)`:0 a .  Currently, there is no nicer 
statement of the computation.  I suppose if it is important enough a new 
instance of `: (evoke gerund) can be defined.

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