# Type signature for nested \`AbstractArray\`

**URL:** https://discourse.julialang.org/t/type-signature-for-nested-abstractarray/1352
**Category:** General Usage
**Tags:** question
**Created:** [January 8, 2017, 1:57pm UTC](https://discourse.julialang.org/t/type-signature-for-nested-abstractarray/1352 "2017-01-08T13:57:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [January 8, 2017, 1:57pm UTC](https://discourse.julialang.org/t/type-signature-for-nested-abstractarray/1352/1 "2017-01-08T13:57:19Z")

</div>

I would like a method `foo(x)` to be called when `x` is a `U{V{T,N}`, where

1. `U <: AbstractVector`,
2. `S <: AbstractArray{T,N}`

and I can’t figure out how. Thought that since

```julia
Array{Int,2} <: AbstractArray{Int,2}`

```

I would have

```julia
Vector{Array{Int,2}} <: AbstractVector{AbstractArray{Int,2}} 

```

but that does not hold. The syntax

```julia
foo{T,N,S <: AbstractArray, U <: AbstractVector}(v::U{S{T,N}}) = :called

```

does not work. Using `0.5.0`.

---

<div class="post-metadata">

### Author: ![jameson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jameson/32/23_2.png) [@jameson](https://discourse.julialang.org/u/jameson)
#### Post date: [January 8, 2017, 3:00pm UTC](https://discourse.julialang.org/t/type-signature-for-nested-abstractarray/1352/2 "2017-01-08T15:00:11Z")

</div>

`U` is a type variable, not a data type, so it can’t be parameterized. In v0.6, you’ll be able to express triangular dispatch, but not in v0.5. But that’s not actually what you want either. The following does what you asked:

```julia
foo{S <: AbstractArray}(v::AbstractVector{S}) = :called

```
