Scalable learning in genetic programming using automatic function definition