Separating the what and how of compositional computation to enable reuse and continual learning