Graph transformations of functions