And if you do need to keep the results, something like (,u)^:n would do it...

That said, I hope the other forms are fixable and get fixed to work
right. (Working correctly should take precedence over working fast,
and in the extreme cases where that's a significant problem, that just
means you need a different facility which has a different design for
"working correctly".)

Thanks,

-- 
Raul

On Tue, Mar 3, 2020 at 8:08 PM Henry Rich <[email protected]> wrote:
>
> BTW, if you only need to run u n times, without keeping the intermediate
> results, u^:n will do I think.
>
> Henry Rich
>
> On 3/3/2020 5:31 PM, David Lambert wrote:
> > My 7-smooth generator depends upon side effects.  We cannot depend on u^:
> > when u has side effects including appreciable resource consumption.  Work
> > around example
> >
> > for.i.20 do. x u y end.
> >
> > thanks
> >
> >> Date: Mon, 2 Mar 2020 18:14:13 -0500
> >> From: Henry Rich <[email protected]>
> >> To: [email protected]
> >> Subject: Re: [Jprogramming] ^:
> >> Message-ID: <[email protected]>
> >> Content-Type: text/plain; charset=utf-8; format=flowed
> >>
> >> Sometimes it does an initial extra iteration.  It does so in this >case.
> >>
> >> I might work on eliminating the extra iteration.  Someday.
> >>
> >> Henry Rich
> >>
> >>
> >>
> >> On 3/2/2020 6:10 PM, Raul Miller wrote:
> >> I think he's asking why there's a second iteration.
> >>
> >> Or, more specifically, why, when n is a list in u^:n why there is an
> >> extra evaluation of u.
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> --
> 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to