Define a function/subroutine inside a derived type

Fortran’s OOP feels really peculiar compared to C++…