The interaction between lifetime learning and evolution