rlist=: TPlist { ?@! { Llist
   TPlist=: 3 : 0
if.y>1 do.
  r=: ,/(i.y)|."1 every<(TPlist<:y),.<:y
else. r=: 1 $0 end.
)
   Llist=: i.@! A. i.

Where "every" is "&>".


On Sun, Jul 22, 2018 at 5:18 PM Henry Rich <[email protected]> wrote:

> What's rlist?
>
> Henry Rich
>
> On 7/22/2018 5:14 PM, Devon McCormick wrote:
> > When I run the example "|:rlist 4" from chapter 33 "Perming and
> Combing", I
> > get two different results from what is shown in the text in v. 8.04 and
> v.
> > 8.07; both differ from the text result which is:
> >
> > 2 3 3 2 0 0 3 2 0 0 2 3 0 0 2 3 3 2 1 1 1 1 1 1
> > 3 2 0 0 2 3 0 0 2 3 3 2 1 1 1 1 1 1 2 3 3 2 0 0
> > 0 0 2 3 3 2 1 1 1 1 1 1 2 3 3 2 0 0 3 2 0 0 2 3
> > 1 1 1 1 1 1 2 3 3 2 0 0 3 2 0 0 2 3 0 0 2 3 3 2
> >
> > In v. 8.04, I get:
> >
> > 2 3 3 2 1 1 3 2 1 1 2 3 1 1 2 3 3 2 0 0 0 0 0 0
> > 3 2 1 1 2 3 1 1 2 3 3 2 0 0 0 0 0 0 2 3 3 2 1 1
> > 1 1 2 3 3 2 0 0 0 0 0 0 2 3 3 2 1 1 3 2 1 1 2 3
> > 0 0 0 0 0 0 2 3 3 2 1 1 3 2 1 1 2 3 1 1 2 3 3 2
> >
> > and in v. 8.07, I get:
> >
> > 0 1 1 0 3 3 1 0 3 3 0 1 3 3 0 1 1 0 2 2 2 2 2 2
> > 1 0 3 3 0 1 3 3 0 1 1 0 2 2 2 2 2 2 0 1 1 0 3 3
> > 3 3 0 1 1 0 2 2 2 2 2 2 0 1 1 0 3 3 1 0 3 3 0 1
> > 2 2 2 2 2 2 0 1 1 0 3 3 1 0 3 3 0 1 3 3 0 1 1 0
> >
> > It looks like these have the same rows (columns above):
> >
> >     (/:~&.|: v807) -: /:~&.|: v804
> > 1
> >     (/:~&.|: v807) -: /:~&.|: ch33
> > 1
> >
> > where "v804" and "v807"  are the results from those versions of J and
> > "ch33" is the result in the essay.
> >
> > Is there a known difference between versions that might explain this?  If
> > something changed with "A.", that might explain it.
> >
> > In any case, how do I edit this to account for these differences?
> >
> > Thanks,
> >
> > Devon
> >
> >
> >
> >
> >
>
>
> ---
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



-- 

Devon McCormick, CFA

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

Reply via email to