# Parametric abstract types

**URL:** <https://discourse.julialang.org/t/parametric-abstract-types/25651>\
**Category:** New to Julia\
**Tags:** parametric-types\
**Created:** [June 25, 2019, 1:25pm UTC](https://discourse.julialang.org/t/parametric-abstract-types/25651 "2019-06-25T13:25:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [June 25, 2019, 1:47pm UTC](https://discourse.julialang.org/t/parametric-abstract-types/25651/2 "2019-06-25T13:47:21Z")

</div>

You should make the type parameter part of the abstract type. e.g.

```julia
abstract type MyAbstractType{T} end
struct MyConcreteType1{T} <: MyAbstractType{T}
    ...
end

```

then you can do

```julia
function fun(x::MyAbstractType{U}, y::MyAbstractType{V}) where {U<:AbstractFloat, V<:AbstractFloat}
end

```

and it will match instances of your concrete type.

---

_[View the full topic](https://discourse.julialang.org/t/parametric-abstract-types/25651)._
