Support writing needed extension types

I think `mapv` can be simplified to `map`.