All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javaslang.algebra.BiFunctor Maven / Gradle / Ivy

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 f1, Function f2);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy