Adapting your own type