This adds a new algorithm named transform_if() which applies a given unary function to an input value only if it passes a separate predicate function.