Functional assignment

I am having trouble with that. First: @[.d;t;:;2] / fails with type error .d.t: 0 / .d.t is now defined @[.d;t;:;2] / now worksWhy does .d.t have to be defined for the functional form of assignmentto workand what is the remedy? Second: @[.d;t;:] 2 / fails with type error @[.d;t;:] @ 2 / fails with type error {@[.d;`t;:;x]} 2 / worksI can live with having to define an explicit function but why do Ihave to?Thanks

.d.t: syntax makes sure that .d is a namespace
for amend to work you have to initialize it
for example:
.[`.d;();:;1#.q]
then
@[`.d;`t;:;2]
works fine

? @[.d;t;:] 2 ? ? ?/ fails with type error ? @[.d;t;:] @ 2 ?/ fails with type error
? {@[.d;t;:;x]} 2 / works

@[.d;t;:[;2]]

Regards,
?Attila

> for amend to work you have to initialize .dRight. It’s not t that was the problem but .d. Makes sense (after thefact). Oneeasily forgets that the “prompt” forms have quite a bit of syntacticsugar thatis missing from the functional forms.> @[.d;t;:[;2]]That’s not what I was looking for. I was trying to come up with aunary verb thattakes a value and assigns it to .d.t

> @[.d;t;:[;2]]

That’s not what I was looking for. I was trying to come up with a
unary verb that
takes a value and assigns it to .d.t

f:@[.d;t;:;]

f 10

but possibly it is the best to use set (which is .[;();:;])

`.d.t set 2

that works fine without having d initialized
?? Attila

OK. I had failed to remember that there is a ternary form of @(protected execution), so you need the trailing ;] to make it aunary verb.Thanks a lot.