Alternatives in automatic function definition: a comparison of performance