Example usage for org.apache.commons.functor.adapter LeftBoundFunction bind

List of usage examples for org.apache.commons.functor.adapter LeftBoundFunction bind

Introduction

In this page you can find the example usage for org.apache.commons.functor.adapter LeftBoundFunction bind.

Prototype

public static <L, R, T> LeftBoundFunction<R, T> bind(BinaryFunction<? super L, ? super R, ? extends T> function,
        L arg) 

Source Link

Document

Adapt a BinaryFunction as a UnaryFunction.

Usage

From source file:org.apache.commons.functor.example.kata.one.Add.java

public static Function<Number, Number> to(int factor) {
    return LeftBoundFunction.bind(INSTANCE, factor);
}

From source file:org.apache.commons.functor.example.kata.one.Multiply.java

public static Function<Number, Number> by(int factor) {
    return LeftBoundFunction.bind(INSTANCE, factor);
}

From source file:org.apache.commons.functor.example.kata.one.Subtract.java

public static Function<Number, Number> from(int factor) {
    return LeftBoundFunction.bind(INSTANCE, factor);
}