# Datatypes 100 and 112

**URL:** https://forum.kx.com/t/datatypes-100-and-112/10101
**Category:** Community Support
**Tags:** kdb-and-q
**Created:** [July 11, 2015, 12:46am UTC](https://forum.kx.com/t/datatypes-100-and-112/10101 "2015-07-11T00:46:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![User7](https://avatars.discourse-cdn.com/v4/letter/u/7ea924/32.png) [@User7](https://forum.kx.com/u/User7)
#### Post date: [July 11, 2015, 12:46am UTC](https://forum.kx.com/t/datatypes-100-and-112/10101/1 "2015-07-11T00:46:00Z")

</div>

Can someone just post an example of function s with datatype 100 (lambda) and 112 (dynamic queries). Also since kdb has a new data type 20 (`sym) does that mean that every other data type got shifted doen by 1 or is it eating a number from the enumeration data type range Lastly, nested types are described to be 77 till 97. What is an example of a nested type ?

---

<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: [July 11, 2015, 7:59pm UTC](https://forum.kx.com/t/datatypes-100-and-112/10101/2 "2015-07-11T19:59:00Z")

</div>

Check this page:&nbsp; [http://code.kx.com/wiki/Reference/Datatypes](http://code.kx.com/wiki/Reference/Datatypes)  
It has examples for all.

---

<div class="post-metadata">

### Author: ![User7](https://avatars.discourse-cdn.com/v4/letter/u/7ea924/32.png) [@User7](https://forum.kx.com/u/User7)
#### Post date: [July 12, 2015, 4:13am UTC](https://forum.kx.com/t/datatypes-100-and-112/10101/3 "2015-07-12T04:13:00Z")

</div>

It does not have examples to any of those questions

---

<div class="post-metadata">

### Author: ![Tom\_Martin](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@Tom\_Martin](https://forum.kx.com/u/Tom_Martin)
#### Post date: [July 13, 2015, 11:34am UTC](https://forum.kx.com/t/datatypes-100-and-112/10101/4 "2015-07-13T11:34:00Z")

</div>

Yes it does.

### Function Types

| **num** | **type/example** |  
| 100 | lambda |  
| 101 | unary primitive |  
| 102 | binary primitive |  
| 103 | ternary (operator) |  
| 104 | projection |  
| 105 | composition |  
| 106 | f' |  
| 107 | f/ |  
| 108 | f\ |  
| 109 | f': |  
| 110 | f/: |  
| 111 | f: |  
| 112 | dynamic load |

For example:

```
q)type each({x+y};neg;-;\;+[;1];<>;,';+/;+\;prev;+/:;+\:;`f 2:`f,1)100 101 102 103 104 105 106 107 108 109 110 111 112h

```

**100:**

```
{x+y}

```

**112:**

```
`f 2:`f,1

```

Type 20 is not a new datatype.&nbsp;

Nested types are nested vectors (i.e. lists of lists)&nbsp;that are mapped from disk.

q)`:floats set (1 2 3f;2 3 4f) //list of lists of floats

`:floats

q)type get `:floats

86h

q)`:ints set (1 2 3i;2 3 4i) //list of lists of ints

`:ints

q)type get `:ints

83h

Again, this is described in the wiki page. The result of "type" is 77 + primitive type. So nested floats are 77+9=86, ints are 77+6=83 etc:

### Nested Types

These types are used for mapped lists of lists of the same type. The numbering is 77 + primitive type (e.g. 78 is boolean, 96 is time and 97 is `sym$ enumeration.) For example:

```
q)`:t1.dat set 2 3#til 6`:t1.datq)a:get `:t1.datq)type a / integer nested type83hq)a0 1 23 4 5

```

I'd recommend fully reading the documentation before asking any questions as the answers are likely in there.

Thanks

Tom
