Lifelong Machine Learning Of Functionally Compositional Structures