![JAR search and dependency download from the Maven repository](/logo.png)
javaslang.algebra.BiFunctor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javaslang-pure Show documentation
Show all versions of javaslang-pure Show documentation
A purely functional layer above Javaslang.
The newest version!
/* / \____ _ _ ____ ______ / \ ____ __ _______
* / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2017 Javaslang, http://javaslang.io
* /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ Licensed under the Apache License, Version 2.0
*/
package javaslang.algebra;
import java.util.function.Function;
/**
* A BiFunctor combines two unrelated {@link Functor}s.
*
* @param component type of the 1st {@code Functor}
* @param component type of the 2nd {@code Functor}
* @author Daniel Dietrich
* @since 2.0.0
*/
public interface BiFunctor {
/**
* Applies two functions {@code f1}, {@code f2} to the components of this BiFunctor.
*
* @param 1st component type of the resulting BiFunctor
* @param 2nd component type of the resulting BiFunctor
* @param f1 mapper of 1st component
* @param f2 mapper of 2nd component
* @return a new BiFunctor
* @throws NullPointerException if {@code f1} or {@code f2} is null
*/
BiFunctor bimap(Function super T1, ? extends U1> f1, Function super T2, ? extends U2> f2);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy