# function loop

**URL:** https://forum.kx.com/t/function-loop/11203
**Category:** Community Support
**Tags:** kdb-and-q
**Created:** [August 22, 2016, 4:37pm UTC](https://forum.kx.com/t/function-loop/11203 "2016-08-22T16:37:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![James11](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@James11](https://forum.kx.com/u/James11)
#### Post date: [August 22, 2016, 4:37pm UTC](https://forum.kx.com/t/function-loop/11203/1 "2016-08-22T16:37:00Z")

</div>

Hi, All\<o:p\>\</o:p\>

**\<o:p\> \</o:p\>**

**f: {show x+y; show z}\<o:p\>\</o:p\>**

**k:((1;2;`a);(3;4;`b);(5;6;`c))\<o:p\>\</o:p\>**

\<o:p\> \</o:p\>

I need to call the function f three times like this:\<o:p\>\</o:p\>

**\<o:p\> \</o:p\>**

**f[1;2;`a]\<o:p\>\</o:p\>**

**f[3;4;`b]\<o:p\>\</o:p\>**

**f[5;6;`c]\<o:p\>\</o:p\>**

\<o:p\> \</o:p\>

How to do this with one statement? Any ideas?\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

Roy\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

---

<div class="post-metadata">

### Author: ![rahul\_asati041](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@rahul\_asati041](https://forum.kx.com/u/rahul_asati041)
#### Post date: [August 22, 2016, 4:54pm UTC](https://forum.kx.com/t/function-loop/11203/2 "2016-08-22T16:54:00Z")

</div>

use each-right to loop and .(dot) operator for function call.  
f &nbsp;./: k;

---

<div class="post-metadata">

### Author: ![jim11](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@jim11](https://forum.kx.com/u/jim11)
#### Post date: [August 22, 2016, 5:03pm UTC](https://forum.kx.com/t/function-loop/11203/3 "2016-08-22T17:03:00Z")

</div>

f ./: k

See the bottom half of http://code.kx.com/wiki/Reference/DotSymbol

---

<div class="post-metadata">

### Author: ![abcfoots1](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@abcfoots1](https://forum.kx.com/u/abcfoots1)
#### Post date: [August 22, 2016, 5:07pm UTC](https://forum.kx.com/t/function-loop/11203/4 "2016-08-22T17:07:00Z")

</div>

f .'k

---

<div class="post-metadata">

### Author: ![James11](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@James11](https://forum.kx.com/u/James11)
#### Post date: [August 23, 2016, 2:17am UTC](https://forum.kx.com/t/function-loop/11203/5 "2016-08-23T02:17:00Z")

</div>

Thanks J\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

**From:** [personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com) [[mailto:personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com)] **On Behalf Of** RAHUL ASATI  
**Sent:** Monday, August 22, 2016 11:55 PM  
**To:** Kdb+ Personal Developers \<personal-kdbplus@googlegroups.com\>  
**Subject:** [personal kdb+] Re: function loop\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

use each-right to loop and .(dot) operator for function call.\<o:p\>\</o:p\>

f &nbsp;./: k;
