Now that looks way better than what I did. After digra, it works differently. I’d still say 0,~ instead of #{. because there is no dependence on its #, really.
Every now and then I see uses of j. I wouldn’t have thought of. Is the list at the bottom of nuvoc’s jdot entry complete? I should start memorizing these uses of pairs of numbers – they’re really handy. (and all the ways !. may be employed, too) Am 04.02.21 um 15:46 schrieb Raul Miller: > Ah, I see it now -- I should have looked closer at your digraphs. > > Here's a fixed version: > > digra=: * 2 | i.@# + +/\ > dedouble=: #!.'X'~ 1 j. [: digra #{.}.=}: > > (I could not think of a good name for the "compress out splits of > non-digraphs" mechanism.) > > The moral of the story here is that numeric calculations can often > replace simple recursive processes. (Because numbers can be defined > recursively.) > > I hope this helps, > -- ---------------------- mail written using NEO neo-layout.org ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm