optimisation: memoise partial solutions already exploring