[Jprogramming] Puzzling behaviour of u} (verb-ammend)
Simon Clarkstone
simon.clarkstone at gmail.com
Sat Jul 16 01:36:47 HKT 2011
On Fri, Jul 15, 2011 at 2:48 PM, Dan Bron <j at bron.us> 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/
More information about the Programming
mailing list