in reply to Loop Abstraction via Recursion
You could of course write a program to generate the source code for a program that solves a particular instance of the problem. Code generation is a quite powerful and IMHO underused concept. If you do, templates are your friends.
Just my 2 cents, -gjb-
|
|---|