Trying to generalize further, I run into a problem
because it seems that if a gerund form is used, J cannot
distinguish between m} and u} and assumes the m} form,
producing an index error. To me, if I am correct, J should
default to the u} form for gerunds.

   13 : '  x #&, i.$ y  '
[ #&, [: i. [: $ ]
   loc =: [ #&, [: i. [: $ ]
   b(('#'"_)`(loc"_)`])}a
|index error
|   b    (('#'"_)`(loc"_)`])}a
   b(('#'"_)`loc`])}a
|index error
|   b    (('#'"_)`loc`])}a

(B=)

On Fri, 21 Jul 2006, Andrew Nikitin wrote:
+ >    ] a =: 5 9 $ '-'
+ >    ] b =: ? ($a) $ 2

+
+ In this specific case is no need for special 'indexes' verb; i. will do just
+ fine (with some magic):
+
+    '#' ( b #&, i.$ a )"_ } a
+ ----##--#
+ #-##-##--
+ ###--####
+ #--#-#-#-
+ -####---#
+
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to