[Jprogramming] insert item
Raul Miller
rauldmiller at gmail.com
Fri Aug 24 02:46:46 HKT 2007
On 8/23/07, Raul Miller <rauldmiller at gmail.com> wrote:
> > ins=:1 :0
> > :
> > b=.1#~1 j.m e.~i.#y
> > x (I.-.b)} b expand y
> > )
Brian Schott pointed out to me that this (and my variant ins1) assume
that m is in ascending order (which I was assuming, since I don't
normally do this kind of thing with indices but with bit masks).
Here's a version which corrects this problem:
ins=:1 :0
:
b=.1#~1 j.m e.~i.#y
(x/:m) (I.-.b)} b expand y
)
Thanks,
--
Raul
More information about the Programming
mailing list