funcgen generates parameterized functions from generic function code.