# question using flip and !

**URL:** https://forum.kx.com/t/question-using-flip-and/7150
**Category:** Community Support
**Tags:** kdb-and-q
**Created:** [May 13, 2011, 10:43pm UTC](https://forum.kx.com/t/question-using-flip-and/7150 "2011-05-13T22:43:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ag12](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@ag12](https://forum.kx.com/u/ag12)
#### Post date: [May 13, 2011, 10:43pm UTC](https://forum.kx.com/t/question-using-flip-and/7150/1 "2011-05-13T22:43:00Z")

</div>

what am I missing?

q)t:(w:-10?`1) /works

q)c:-10?`1

q)flip `w!c

'type

---

<div class="post-metadata">

### Author: ![Chris\_Burke1](https://avatars.discourse-cdn.com/v4/letter/c/e9bcb4/32.png) [@Chris\_Burke1](https://forum.kx.com/u/Chris_Burke1)
#### Post date: [May 14, 2011, 12:56am UTC](https://forum.kx.com/t/question-using-flip-and/7150/2 "2011-05-14T00:56:00Z")

</div>

A dictionary is an association of lists. Both keys and values shouldbe coerced to matching lists if necessary.q)c:-10?`1q)`w!c’typeq)`w`w!(c;c)w| e l b p k o m d a cw| e l b p k o m d a cq)(enlist `w)!enlist cw| e l b p k o m d a cOn May 14, 5:43?am, ag <anuj.go...> wrote:&gt; what am I missing?&gt;&gt; q)t:([]w:-10?`1) /works\>\> q)c:-10?`1&gt; q)flip `w!c\> 'type\</anuj.go…\>

---

<div class="post-metadata">

### Author: ![Aaron\_Davies](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@Aaron\_Davies](https://forum.kx.com/u/Aaron_Davies)
#### Post date: [May 14, 2011, 3:07am UTC](https://forum.kx.com/t/question-using-flip-and/7150/3 "2011-05-14T03:07:00Z")

</div>

To: [personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com)  
X-Mailer: Apple Mail (2.1084)

`w!c isn't valid for those types (sym as left arg to ! is trying to = create an enumeration, which requires int vector as the right arg), you = want flip(enlist`w)!enlist c
