# Doc for eltype(A)\[A\[k\] for k in v\]?

**URL:** https://discourse.julialang.org/t/doc-for-eltype-a-a-k-for-k-in-v/2317
**Category:** New to Julia
**Created:** [February 26, 2017, 3:18pm UTC](https://discourse.julialang.org/t/doc-for-eltype-a-a-k-for-k-in-v/2317 "2017-02-26T15:18:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)
#### Post date: [February 26, 2017, 3:18pm UTC](https://discourse.julialang.org/t/doc-for-eltype-a-a-k-for-k-in-v/2317/1 "2017-02-26T15:18:11Z")

</div>

I have seen the use of `eltype(A)[A[k] for k in v]` a few times in a package. Not seeing the doc for this syntax [here](http://docs.julialang.org/en/stable/stdlib/collections/?highlight=eltype#Base.eltype). But I know that I must have missed looking at somewhere else. Can anyone remind me? Thanks!

---

<div class="post-metadata">

### Author: ![PabloZubieta](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@PabloZubieta](https://discourse.julialang.org/u/PabloZubieta)
#### Post date: [February 26, 2017, 3:22pm UTC](https://discourse.julialang.org/t/doc-for-eltype-a-a-k-for-k-in-v/2317/2 "2017-02-26T15:22:46Z")

</div>

[http://docs.julialang.org/en/stable/manual/arrays/?highlight=comprehensions#comprehensions](http://docs.julialang.org/en/stable/manual/arrays/?highlight=comprehensions#comprehensions)

That syntax is shown at the end of that section, except that it uses a specific type instead of `eltype`.

---

<div class="post-metadata">

### Author: ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)
#### Post date: [February 26, 2017, 3:25pm UTC](https://discourse.julialang.org/t/doc-for-eltype-a-a-k-for-k-in-v/2317/3 "2017-02-26T15:25:52Z")

</div>

Aha, thanks buddy!
