Basically, in case it's not obvious, colchain is returning a vector of two
values, 1) the number of steps that particular sequence takes and 2) the
largest nuber present in that sequence (hence the x:).


On 5 August 2014 00:11, Alex Giannakopoulos <[email protected]> wrote:

> On 4 August 2014 23:52, Raul Miller <[email protected]> wrote:
>
>> Do you mean
>>
>
> Yes, I do   :)
>
>
>>  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.
>>
>
> Is it?  It's not even necessary.  I put it in so that it would return an
> exact integer rather than a large floating point value,
>
> I have also just upgraded my J8.01 via pacman, and it's broken it!
> So I can't test at the moment, sorry!
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to