Dan,

I'm reassured that the difficulty is as genuine as it seemed to me, in
contrast to the many times I just hadn't grasped the smooth way to do
something in J.

I share your interest in Igor Zhuravlov's proposal, and will be studying it
as time allows.

For my toy example, the awkwardness of the test on diagonals, relative to
the others, can be cloaked by bringing the other tests into a cover verb as
shown below.

--
Tracy



Vacant=: 0

gameover =: verb define
no_vacancies =. [: -. [: Vacant& e. ,
column =. [: +./ *.&(Vacant& ~:)/   *. =/
row    =. [: +./ *.&(Vacant& ~:)/"1 *. =/"1
DL =. <./ $ y
diag   =. [: +./ |. ,&(((-.@:((,:Vacant)&-:) *. 1=#)@: ~.)/. *. (DL=#)/.) ]
+./ no_vacancies, column, row, diag y
)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to