Learning Functional Data Structures and Algorithms