yes its efficient, simply collecting the results of each iteration while the 
function is applied to the "last value".




________________________________
From: Rudolf Sykora <rudolf.syk...@gmail.com>
To: programm...@jsoftware.com 
Sent: Thursday, August 10, 2017 10:30 AM
Subject: [Jprogramming] apply iteratively



Hello,


if I want to apply a function F iteratively say 0, 1, 2, 3 .. N times

on y (and see

the individual results), I know I can do


F^: (i.N) y


But is this efficient or not? I.e., does the F^:3 uses the result of previously

calculated F^:2 ? Or are the calculations completely independent (as I guess)?

What's the idiomatic way to do this right?


Thanks

Ruda

----------------------------------------------------------------------

For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to