On Fri, Jul 15, 2011 at 2:48 PM, Dan Bron <[email protected]> wrote:
> Verbal amend is under-documented and rarely used, due to the property you've
> discovered.
>
> In fact, verbal amend is only ever used when that property is desired.
> Otherwise, one would use the noun or gerundial form.
>
> The property is that in  x f} y  the verb  f  addresses indices into the
> __ravel__ of y.  So, for example, x 4:} y inserts x at 4 { (,y)  .
>
> This has been a known bug for a long time:
>
> http://www.jsoftware.com/jwiki/System/Interpreter/Bugs#specificationofverbal
> amendincomplete

Thanks, it is good to know I was understanding correctly then.

I see how the gerundial form is an adequate workaround, using [ and ] :

   a =: 'abcd',:'efgh'
   '*' [`((<1 2)"_)`]} a
abcd
ef*h

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

Reply via email to