You have not really defined better, but:

   slice=: <@,@}././@|:@(,~_1,.~i.@{.@(1 + >./))

But I am wondering why this approach?

Do you really need to eliminate the placeholder elements?  Or, can you
use innocuous values there?  Do you really need this data structure?
Or could you instead use a bitmap (1:`(<"1@])`(0 $~ 1 + >./@])}~
data)?

Anyways, I do not feel I understand what you are doing well enough to
make any useful suggestions.

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

Reply via email to