extending a dictionary

Unlike vectors, dictionaries can be extended with amend:KDB+ 2.7 2010.08.05 Copyright (C) 1993-2010 Kx Systemsm32/ 2()core 4096MB andy slakt.local 10.0.1.3 PLAY 2010.11.03q)d:ab!100 200q)d[c]:300q)da| 100b| 200c| 300If you use a functional amend to extend a dictionary, how is the non-existent left-hand argument calculated? The observed behavior seemsunexpected:q)d[plus]+:1q)d[minus]-:1q)d[times]*:1q)da | 100b | 200c | 300plus | 1minus| -1times| 1What I would have expected is that the values added by thesefunctional amends would all be 0N, since d[`nonexistent] evaluates to0N and the three functions used here usually produce null if eitherargument is null. However, we don’t see nulls but concrete values: the+ and - functions used 0 for the left-hand argument, while * used 1.Are these special cases of some sort? Are they documented?

more on functional amend…For lists, functional amend seems to swallow type errors unexpectedly:KDB+ 2.7 2010.08.05 Copyright (C) 1993-2010 Kx Systemsm32/ 2()core 4096MB andy slakt.local 10.0.1.3 PLAY 2010.11.03q)L:1 2 3q)L[::]:(1;1;1.0)'typeq)L[::]+:(1;1;1.0)q)L1 2 3Shouldn’t the last amend have thrown a type error?

Are these special cases of some sort? Are they documented?

Yes and not really.

The +: variants are more forgiving in general.

They also create a variable if it did no exist earlier..

Regards,
? Attila