Generalize the generalized fractal code