>          db =. 1 j. <: #;.1~  b=. 0 1 1 0 0 1
>          _1 |. ('abc' {.~ #x) #!.'.'~ x =. db , 0 j. b i. 1
>       .ab..c

Whoops, when I wrote:

           _1 |.   ...

it really should've been:

           li =.  b i. 1
           (-li) |.   ...

The tacit verb could be rewritten to reflect this, either by boxing up reusable 
results and later picking apart the boxes, which
would would make it inscrutibly complex, or by recalculating  li  , which would 
make it unsatisfyingly redundant.  

So I suggest instead an explicit verb with temporary variables:

           expand =: dyad define
                db =. 1 j. <: #;.1~  x
                  (-li) |. (y {.~ #cpx) #!.'.'~ cpx =. db , 0 j. li =. x i. 1
           )
        
           0 1 1 0 0 1 expand 'abc'
        .ab..c


-Dan

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

Reply via email to