Add a dataflow-transformation function to the constructor.