class PipelineFunctionDefault implements PipelineFunction {

    @Override
    public PipelineElement apply(final PipelineElement value, final String paramsIncludingParentheses,
            final ExpressionResolver expressionResolver) {

        // parse + resolve the specified default value for unresolved placeholders
        // if previous stage does not resolve to a value. deleted pipeline elements remain deleted.
        // evaluate parameter first to fail fast.
        final PipelineElement parameter = parseAndResolveThrow(paramsIncludingParentheses, expressionResolver);
        return value.onUnresolved(() -> parameter);
    }

}