I'm running into a problem with :.1 which, when I simplify the code, disappears.

So, here's the problem in raw form:

   (TAB,' ') parseout sample1
+--+---+
|$r|1 2|
+--+---+
+---+-+
|+/d|2|
+---+-+
|assertion failure
|       (#r)=+/d

parseout=: {{
   d=. (=<./)y (1 i.~ -.@e.)S:0 m
   r=.d parse2;.1 y
   if. (#r) ~:+/d do.
     echo '$r';$r
     echo '+/d';+/d
     assert. (#r)=+/d
   end.
}}

parse2=: {{
  ({.y);<m parseout^:(*@#)}.y
}}

sample1=: cutLF {{)n
zeta
    beta
    gamma
        lambda
        kappa
        mu
    delta
alpha
    theta
    iota
    epsilon
}}

In other words, I expect parse2 to return a list of two boxes, and I
expect that the result of parseout would have one of these pairs for
each 1 in the delimiter sequence 'd'.

But that's not happening here.

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to