# vs

**URL:** https://forum.kx.com/t/vs/11669
**Category:** Community Support
**Tags:** kdb-and-q
**Created:** [December 25, 2017, 10:45pm UTC](https://forum.kx.com/t/vs/11669 "2017-12-25T22:45:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![newstudent20171](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@newstudent20171](https://forum.kx.com/u/newstudent20171)
#### Post date: [December 25, 2017, 10:45pm UTC](https://forum.kx.com/t/vs/11669/1 "2017-12-25T22:45:00Z")

</div>

Can someone explain this k symbology of **vs** as&nbsp;  
k){x:y}

Is : an adverb each left or something else ? reason its confusing is if its an adverb then where is the verb ?

---

<div class="post-metadata">

### Author: ![quintanar4011](https://avatars.discourse-cdn.com/v4/letter/q/6f9a4e/32.png) [@quintanar4011](https://forum.kx.com/u/quintanar4011)
#### Post date: [December 26, 2017, 11:31am UTC](https://forum.kx.com/t/vs/11669/2 "2017-12-26T11:31:00Z")

</div>

x is the verb - expressions with adverbs can have 1, 2 or more args. The 1 arg case is hidden in vs and sv for each-left/right but you can call it directly - (0b:)123. It seems though&nbsp;that all possible xs are hardcoded so 1 arg case is not a real adverb.

???, 26 ??? 2017 ?., 12:41:05 UTC+3 ??? Science Student ???:

> Can someone explain this k symbology of **vs** as&nbsp;  
> k){x:y}
> 
> Is : an adverb each left or something else ? reason its confusing is if its an adverb then where is the verb ?

---

<div class="post-metadata">

### Author: ![newstudent20171](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@newstudent20171](https://forum.kx.com/u/newstudent20171)
#### Post date: [December 27, 2017, 4:43am UTC](https://forum.kx.com/t/vs/11669/3 "2017-12-27T04:43:00Z")

</div>

Question becomes more interesting because x and y are variables then what is the adverb doing (possibly) without the verb ? See x and y as variables

x:", "&nbsp;

y:“spring, summer, autumn, winter”

k)x:y

Output **same** as vs

(“spring”;“summer”;“autumn”;“winter”)

---

<div class="post-metadata">

### Author: ![quintanar4011](https://avatars.discourse-cdn.com/v4/letter/q/6f9a4e/32.png) [@quintanar4011](https://forum.kx.com/u/quintanar4011)
#### Post date: [December 27, 2017, 7:42am UTC](https://forum.kx.com/t/vs/11669/4 "2017-12-27T07:42:00Z")

</div>

An adverb can be applied to anything not just a verb. x/:y means (x/:) y where (x/:) is a new function created by /:

For example:&nbsp;xor via an adverb - (01b;10b)'[100010b;101011b]

???, 27 ??? 2017 ?., 9:54:39 UTC+3 ??? [newstud...@gmail.com](mailto:newstud...@gmail.com) ???:

> Question becomes more interesting because x and y are variables then what is the adverb doing (possibly) without the verb ? See x and y as variables
> 
> x:", "&nbsp;
> 
> y:“spring, summer, autumn, winter”
> 
> k)x:y
> 
> Output **same** as vs
> 
> (“spring”;“summer”;“autumn”;“winter”)

---

<div class="post-metadata">

### Author: ![newstudent20171](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@newstudent20171](https://forum.kx.com/u/newstudent20171)
#### Post date: [December 27, 2017, 2:43pm UTC](https://forum.kx.com/t/vs/11669/5 "2017-12-27T14:43:00Z")

</div>

Thanks a lot for explaining this . If you do not mind, I would like to understand this better and had a few questions:

What does (x/:) in your example mean ? What if x was a list of lists or numeric ? Is there any documentation regarding an adverb not having a verb when applying it to something ?

>

---

<div class="post-metadata">

### Author: ![quintanar4011](https://avatars.discourse-cdn.com/v4/letter/q/6f9a4e/32.png) [@quintanar4011](https://forum.kx.com/u/quintanar4011)
#### Post date: [December 28, 2017, 7:27am UTC](https://forum.kx.com/t/vs/11669/6 "2017-12-28T07:27:00Z")

</div>

You can think of an adverb as a function that takes another function and extends it. Thus /: could be defined as

{[f;x;y] f each y} /&nbsp; 2 args

{[f;x] $[x~a;…;x~b;…]} / 1 arg

(x/:) would mean {[f;x] …}

???, 27 ??? 2017 ?., 18:06:43 UTC+3 ??? Science Student ???:

> Thanks a lot for explaining this . If you do not mind, I would like to understand this better and had a few questions:
> 
> What does (x/:) in your example mean ? What if x was a list of lists or numeric ? Is there any documentation regarding an adverb not having a verb when applying it to something ?
> 
> >

---

<div class="post-metadata">

### Author: ![Muneish\_Adya](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Muneish\_Adya](https://forum.kx.com/u/Muneish_Adya)
#### Post date: [December 28, 2017, 1:34pm UTC](https://forum.kx.com/t/vs/11669/7 "2017-12-28T13:34:00Z")

</div>

Once you move to k level, symbols are “overloaded” and behave differently based on input type.&nbsp;  
/: is defined as a adverb in q (q for mortals). But there is no k for mortals. To learn k be a bit openminded to symbols being overloaded n keep looking at q function definitions.
