(responding to
http://jsoftware.com/pipermail/programming/2021-December/059436.html#)
I am not sure that I thought this example out well enough for it to be
good on an examples page.
For instance, after thinking about it for just a few minutes, I realized that
b2fold=: 0 0 0&(}.F..{{
'dH0 dA0 N'=. x
'A H D'=. y
dA=: N*dA0
dH=: N*dH0
dD=: A*dH
y+dA,dH,dD
}})
b2=: {{*/b2fold y}}
would have been clearer.
(Originally I was using ]F.. and commenting that I needed to drop the
first item of the result. But isn't it clearer to include that drop
mechanism with the fold implementation?)
But (and this is worse): this particular example lacks utility, which
means that it's not going to be very interesting for anyone.
Other opportunities will arise, though. And I think that your concept
of linked example pages is a good one and worth following up on.
Thanks,
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm