Fix vector function generator