In all but the simplest cases, I prefer forks over hooks.


----- Original Message -----
From: "R.E. Boss" <[email protected]>
Date: Sunday, July 19, 2009 12:38
Subject: Re: [Jprogramming] Accumulation, interest, and simulation
To: 'Programming forum' <[email protected]>

>    acc1=: (] * +/\@:%) */\
>    d acc1 1+r
> 1000 1040 1102.4 1657.52 1740.396
> 
> 
> R.E. Boss
> 
> 
> > -----Oorspronkelijk bericht-----
> > Van: [email protected] [mailto:programming-
> > [email protected]] Namens Roger Hui
> > Verzonden: zaterdag 18 juli 2009 18:43
> > Aan: Programming forum
> > Onderwerp: Re: [Jprogramming] Accumulation, interest, and simulation
> > 
> > Found it.  Now the question is whether it solves
> > the same problem.
> > 
> > John Gaboury, Letter to the Editor, APL Quote-Quad,
> > Volume 7, Number 4, Winter 1977.
> > 
> >    acc=: [ (] * +/\@:%) */\...@]
> > 
> >    r=. 0.05 0.04 0.06 0.05 0.05  NB. 
> interest rates
> >    d=. 1000 0 0 500 
> 0            NB. deposits
> >    d acc 1+r
> > 1000 1040 1102.4 1657.52 1740.4
> > 
> > 
> > 
> > ----- Original Message -----
> > From: Roger Hui <[email protected]>
> > Date: Saturday, July 18, 2009 9:19
> > Subject: Re: [Jprogramming] Accumulation, interest, and simulation
> > To: Programming forum <[email protected]>
> > 
> > > There was (I think) a very neat solution APL published
> > > in the Quote-Quad in the late 1970s - early 1980s.
> > > It was a very short one-liner involving */\ and +/\ .
> > > I'll see if I can find it or reproduce it.
> > >
> > > Perhaps Joey Tuttle (the keeper of all things) would
> > > have a copy of it.  I am pretty sure it would be in
> > > one of the IPSA utility workspaces, such as 880 sauce.
> > > The function would be called "accum" or some such.
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: Bill Harris <[email protected]>
> > > Date: Saturday, July 18, 2009 8:20
> > > Subject: Re: [Jprogramming] Accumulation, interest, and simulation
> > > To: Programming forum <[email protected]>
> > >
> > > > Thanks, all.  I figured \. came into it somehow, but I
> > > > didn't get from
> > > > there to the end.  I'll study your solutions later today.
> > > >
> > > > Bill
> > > >
> > > > PS: Thanks for not being misled by my typo in the original 
> Aprime> > > example, which didn't include the second deposit in the
> > > rolling sum.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to