:D

Playing mental block defense with yourself now?  That was awesome; keep
going, you are on a roll!


On Wed, Jan 17, 2018 at 10:36 PM, Raul Miller <[email protected]> wrote:

> Oops, I should have said "where next was not a function". But recur
> was something of a left identity function, when it wasn't throwing
> errors.
>
> Thanks,
>
> --
> Raul
>
> On Wed, Jan 17, 2018 at 10:34 PM, Raul Miller <[email protected]>
> wrote:
> > With all that said, I should point out that
> >
> >     evolve=:[
> >
> > is a better optimization.
> >
> > And, with that in mind,
> >
> > FB=: [
> > FT=: 1:
> >
> > satisfies my original claim for this case.
> >
> > This approach does suffer from the conceptual pain of FB being a
> > function where recur was not a function, but that's just the sort of
> > sacrifice you have to make when dealing with optimizations.
> >
> > Thanks,
> >
> > --
> > Raul
> >
> >
> > On Wed, Jan 17, 2018 at 9:10 PM, Raul Miller <[email protected]>
> wrote:
> >> Ah, I see what you are getting at (though now I am wondering why it
> >> worked so flawlessly when I was testing it - today it has not worked
> >> for me even once).
> >>
> >> But, yes: the next verb is not a function. Instead, its user must
> >> adopt a humpty dumpty mindset where doing the same thing with the same
> >> argument will sometimes but not always produces a different result.
> >>
> >> Still, we could do something like:
> >>
> >> crazy=:1 :0
> >>   if.0=L.y do. 0;u y else.
> >>     (-.0{::y); u 1{::y
> >>   end.
> >> :
> >>   if.0=L.y do. 0;x u y else.
> >>     (-.0{::y); x u 1{::y
> >>   end.
> >> )
> >>
> >> sane=: 1 :0
> >>   if.0<L.y do.u 1{::y else. u y end.
> >> :
> >>   if.0<L.y do.x u 1{::y else. x u y end.
> >> )
> >>
> >> FC=: ]sane
> >> FB=: next crazy
> >> FT=: NotMatch sane
> >>
> >> recur=: FC@(FB^:FT^:_)
> >>
> >> Which, I now believe, is what you were getting at.
> >>
> >> Thanks,
> >>
> >> --
> >> Raul
> >>
> >>
>
> >>>> > ------------------------------------------------------------
> ----------
> >>>> > For information about J forums see http://www.jsoftware.com/forum
> s.htm
> >>>> ------------------------------------------------------------
> ----------
> >>>> For information about J forums see http://www.jsoftware.com/forum
> s.htm
> >>>>
> >>> ----------------------------------------------------------------------
> >>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> 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