Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!mach1!torn!spool.mu.edu!howland.reston.ans.net!gatech!purdue!mentor.cc.purdue.edu!mentor!weg
From: weg@mace.cc.purdue.edu (Eythan Weg)
Subject: Re: Triadic Operators in J?
In-Reply-To: cbbrowne@csi.uottawa.ca's message of Mon, 12 Apr 93 21:20:07 GMT
Message-ID: <WEG.93Apr12172139@mace.cc.purdue.edu>
Sender: news@mentor.cc.purdue.edu (USENET News)
Organization: Purdue University
References: <1993Apr12.212007.6986@csi.uottawa.ca>
Date: Mon, 12 Apr 1993 22:21:39 GMT
Lines: 24

In article <1993Apr12.212007.6986@csi.uottawa.ca> cbbrowne@csi.uottawa.ca (Christopher Browne) writes:


   .............

   I'm trying to build up a function that manipulates A, x AND c.  The
   sub-pieces aren't any problem; I have a function Px that works fine in
   the form:

   Pnull =. A Px x

   The problem is that I really don't want that result; I actually want

   cp =. (A Px x) +/ . * c

How about this:

	cp1 =. ((&Px)(@[))(` (+/ . *)) (`  ]) \

You have now an adverb.  Use it like: x A cp1 c  .

When you are done, would you please post your LP program?

Eythan
