# Stripping parameter from parametric types

**URL:** <https://discourse.julialang.org/t/stripping-parameter-from-parametric-types/8293>\
**Category:** New to Julia\
**Tags:** parametric-types\
**Created:** [January 11, 2018, 3:03pm UTC](https://discourse.julialang.org/t/stripping-parameter-from-parametric-types/8293 "2018-01-11T15:03:46Z")\
**Posts on this page:** 1\
**Showing post:** 14

<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 24, 2018, 4:49am UTC](https://discourse.julialang.org/t/stripping-parameter-from-parametric-types/8293/14 "2018-01-24T04:49:53Z")

</div>

“stripping the last specified parameter in a parametric type” is an underspecified operation. There’s perhaps several ways of doing it, but it’s slightly arbitrary to care about _this_ super type compared to any other possible super type. As for that, I would probably go with the following implementation, until someone explained why they wanted to do this particular non-sensical operation:

```julia
supertypeof(x::T) where {T} =
    (isempty(T.parameters) ? supertype(T) : T.name.wrapper{T.parameters[1:(end - 1)]...})

```

---

_[View the full topic](https://discourse.julialang.org/t/stripping-parameter-from-parametric-types/8293)._
