Here's an experiment which I think shows something about M. and colchain:

nextcol =: 3 : 0
 if. 0=2|y do. -: y
 else. >: 3*y
 end.
)

colchain =: 3 : 0  NB. no M.
 if. y=2 do. 1,2
 else. chain=. colchain nextcol y
  (>:0{chain),x:y>.1{chain
 end.
)

   (6!:2,7!:2) 'colchain"0 >:5#i. 100'
0.126736 309184
   (6!:2,7!:2) 'colchain M."0 >:5#i. 100'
0.0236838 190912

In other words, it does seem to be working. But it can only do so much.

Thanks,

-- 
Raul



On Mon, Aug 4, 2014 at 7:52 PM, Raul Miller <[email protected]> wrote:

> Oops, I misread it. sorry about that.
>
> I need to think about this more carefully.
>
> Thanks,
>
> --
> Raul
>
>
>
>
> On Mon, Aug 4, 2014 at 7:11 PM, 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
>>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to