Sets a {@link Function} to execute if this matches.
12081
public FluentMatchingR<T, R> get(Function<A, R> function) {
    return get(fluentMatchingR, function);
  }
504778
public void setFunctions(java.util.Collection<FunctionConfiguration> functions) {
        if (functions == null) {
            this.functions = null;
            return;
        }

        this.functions = new java.util.ArrayList<FunctionConfiguration>(functions);
    }
32082
@Pure
	public static <P1, RESULT> Function0<RESULT> curry(final Function1<? super P1, ? extends RESULT> function, final P1 argument) {
		if (function == null)
			throw new NullPointerException("function");
		return new Function0<RESULT>() {
			@Override
			public RESULT apply() {
				return function.apply(argument);
			}
		};
	}
967003
def set_function(self, f):
        

        def samples(self):
            return (('', {}, float(f())),)

        self._child_samples = types.MethodType(samples, self)
466306
public FluentMatchingR<T, R> orElse(Function<T, R> function) {
    patterns.add(Pattern.of(t -> true, function::apply));
    return this;
  }
388492
private FunctionType matchFunction(
      FunctionType expectedType, FunctionType currentType, boolean declared) {
    if (declared) {
      // If the function was declared but it doesn't have a known "this"
      // but the expected type does, back fill it.
      if (currentType.getTypeOfThis().isUnknownType()
          && !expectedType.getTypeOfThis().isUnknownType()) {
        FunctionType replacement =
            FunctionType.builder(registry)
                .copyFromOtherFunction(currentType)
                .withTypeOfThis(expectedType.getTypeOfThis())
                .build();
         return replacement;
      }
    } else {
      // For now, we just make sure the current type has enough
      // arguments to match the expected type, and return the
      // expected type if it does.
      if (currentType.getMaxArity() <= expectedType.getMaxArity()) {
        return expectedType;
      }
    }
    return currentType;
  }
1018375
public void create_function( String name, int nargs, Function f ) {
        synchronized (this) {
            _create_function(name, nargs, f);
        }
    }
1034930
public static <T> Predicate<T> predicate(Function<T, Boolean> function) {
        dbc.precondition(function != null, "cannot adapt a null function");
        return function::apply;
    }
888754
function(funcName, expr, sup, sub) {
                    this.callBase();
                    this.setFlag("Func");
                    this.funcName = funcName;
                    this.setOperator(new FunctionOperator(funcName));
                    this.setExpr(expr);
                    this.setSuperscript(sup);
                    this.setSubscript(sub);
                }
153955
public <T extends Function> T addFunction(T function) {
		addItem(function, functions, "functions");
		return function;
	}
386929
function (f, cont) {
    var result = f();
    if (result && typeof result.always === 'function') {
      result.always(cont);
    } else {
      cont();
    }
  }
1173392
public static <T, F> Function<F, T> memoize(final Function<F, T> function) {
        return new MemoizeFunction<F, T>() {
            @Override
            public T calc(F arg) {
                return function.apply(arg);
            }
        };
    }
92456
public static <T, R> boolean contains(Collection<T> data, R what, Function<T, R> function) {
        if (data == null) return false;
        for (T o : data) {
            if (Utils.equal(function.apply(o), what)) {
                return true;
            }
        }
        return false;
    }
1017574
def execute(function, name):
    
    try:
        return TaskResult(name, True, None, function())
    except Exception as exc:
        return TaskResult(name, False, exc, None)
340992
@Override
    public boolean allMatch($.Function<? super T, Boolean> predicate) {
        return !anyMatch($.F.negate(predicate));
    }
268696
protected void execute(Connection tx, String query, ExecuteFunction function) {
        try (Query q = new Query(objectMapper, tx, query)) {
            function.apply(q);
        } catch (SQLException ex) {
            throw new ApplicationException(ApplicationException.Code.BACKEND_ERROR, ex);
        }
    }
139866
public void setFunctions(Map<String, String> funcs) {
        if (null == funcs || funcs.isEmpty()) {
            return;
        }
        functions = funcs;
    }