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

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

Introduction

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

Prototype

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

Source Link

Document

Adapt a BinaryFunction to the UnaryFunction interface.

Usage

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

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

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

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