# calling amend

**URL:** <https://forum.kx.com/t/calling-amend/6837>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [December 27, 2010, 4:12am UTC](https://forum.kx.com/t/calling-amend/6837 "2010-12-27T04:12:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![effbiae](https://avatars.discourse-cdn.com/v4/letter/e/ecae2f/32.png) [@effbiae](https://forum.kx.com/u/effbiae)\
**Post date:** [December 27, 2010, 4:12am UTC](https://forum.kx.com/t/calling-amend/6837/1 "2010-12-27T04:12:00Z")

</div>

hi guys,how can i use : (amend) with . (dot) or @ (apply) toset a list of variables?or maybe, the solution does not involve . or @ ?q) .[:;`x,2]2q) x'xq)@[:;`x,2]:[(`x;2)]the rationale is that i need to apply this functionover a list. (say i have vars:`x`y`z vals: 1 2 3)ta, jack

---

<div class="post-metadata">

**Author:** ![junan\_duan](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@junan\_duan](https://forum.kx.com/u/junan_duan)\
**Post date:** [December 27, 2010, 5:04am UTC](https://forum.kx.com/t/calling-amend/6837/2 "2010-12-27T05:04:00Z")

</div>

q)@[`.;`x`y`z;:;1 2 3]  
`.  
q)x  
1  
q)y  
2  
q)z  
3

Not sure this is what you want though.

Junan

---

<div class="post-metadata">

**Author:** ![trieder](https://avatars.discourse-cdn.com/v4/letter/t/a587f6/32.png) [@trieder](https://forum.kx.com/u/trieder)\
**Post date:** [December 27, 2010, 6:48am UTC](https://forum.kx.com/t/calling-amend/6837/3 "2010-12-27T06:48:00Z")

</div>

charset=us-ascii  
X-Mailer: iPhone Mail (8C148)  
In-Reply-To:   
Message-Id: \<61ACF25B-296C-4A65-933B-B88E5E9DF75A@gmail.com\>  
Date: Mon, 27 Dec 2010 01:48:32 -0500  
To: “[personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com)”   
  
Mime-Version: 1.0 (iPhone Mail 8C148)  
  
I might be confused, but I think you want:  
  
vars set’ vals  
  
?

---

<div class="post-metadata">

**Author:** ![andyturk](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andyturk](https://forum.kx.com/u/andyturk)\
**Post date:** [December 27, 2010, 11:06am UTC](https://forum.kx.com/t/calling-amend/6837/4 "2010-12-27T11:06:00Z")

</div>

On Dec 27, 1:48 pm, Timothy Rieder \<trie…\> wrote:\> vars set’ valsThat’s probably the cleanest solution. Note that set is actually justa projection of the verb dot:`x`y`z set' 1 2 3becomes(.[`x;();:;1];.[`y;();:;2];.[`z;();:;3])In Junan’s version, the “dot” is the name of the root dictionary (notthe verb). Both solutions only work with global variables and bypassany locals. For example,{`x`y`z set’1 2 3;x+y+z}[0;0;0]binds x, y, and z globally, but still evaluates to zero.\</trie…\>

---

<div class="post-metadata">

**Author:** ![effbiae](https://avatars.discourse-cdn.com/v4/letter/e/ecae2f/32.png) [@effbiae](https://forum.kx.com/u/effbiae)\
**Post date:** [December 27, 2010, 1:31pm UTC](https://forum.kx.com/t/calling-amend/6837/5 "2010-12-27T13:31:00Z")

</div>

thanks to all - set’ works well for me.

turns out my main problem was that  
one of the symbols was `get

ta, jack.
