Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!news-server.csri.toronto.edu!rpi!usc!wupost!darwin.sura.net!haven.umd.edu!socrates!socrates!rockwell
From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Subject: Re: J Function Question
In-Reply-To: ppetto@NCoast.ORG's message of Mon, 2 Mar 1992 16:35:41 GMT
Message-ID: <ROCKWELL.92Mar3002355@socrates.umd.edu>
Sender: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Organization: Traveller
References: <1992Mar2.163541.2711@NCoast.ORG>
Date: Tue, 3 Mar 1992 05:23:55 GMT
Lines: 19

Peter Petto:
      npv=.'+/y.' : '+/(y.%(1+x.)^(#\y.))'

   I would like to define a "mystery function" that will apply a set
   of left-side values to the same right-side values, yielding results
   as follows:
         0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 mystfn 1000 1200 1500 900
    4077 3983.71 3893.76 3807.01 3723.31 3642.51 3564.49 3489.13

This works for me:
   0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 (npv"0 1/) 1000 1200 1500 900
4077 3983.71 3893.76 3807.01 3723.31 3642.51 3564.49 3489.13

So, I'd say you could use
   mystfn=. npv"0 1/

-- 
Raul Deluth Miller-Rockwell                   <rockwell@socrates.umd.edu>

