Composition and computation in dynamical systems