Roger Hui <[EMAIL PROTECTED]> wrote:
> Somewhere in the description there will be a section on evaluation order.
> What the dictionary permits for the monad u"r is
>
> rankmonad=: 2 : 0
> z=. a: $~ m=. */$ t=. <"n y
> for_i. ?~m do. z=. z i}~ u&.> i{,t end.
> >($t)$z
> )
>
> What the current serial implementation does is:
>
> rankmonad=: 2 : 0
> z=. a: $~ m=. */$ t=. <"n y
> for_i. i.m do. z=. z i}~ u&.> i{,t end.
> >($t)$z
> )
I can't remember where I read it, but I was under the impression that
for. doesn't guarantee order of execution, so
for_i. i.m can behave like for_i ?~m
making the above two definitions semantically equivalent.
(On an unrelated second note, doesn't using <"n in the above
definitions make them conceptually infinitely recursive?)
-- Mark D. Niemiec <[EMAIL PROTECTED]>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm