Do you mean
nextcol =: 3 : 0
if. 0=2|y do. -: y
else. >: 3*y
end.
)
colchain =: 3 : 0 M.
if. y=2 do. 1,2
else. chain=. colchain nextcol y
(>:0{chain),x:y>.1{chain
end.
)
If so, that is an incomplete definition - x is a global variable in
colchain.
Before we can talk about performance, we should probably sort out the
correctness issues?
Thanks,
--
Raul
On Mon, Aug 4, 2014 at 5:56 PM, Alex Giannakopoulos <[email protected]
> wrote:
> On the subject of memoizing, I'd be curious to know why the colchain verb I
> tried above (post 20h12) does not seem to work with M. whereas, say, the
> fib example given in the Voc does. I have copied the syntax almost
> identically.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm