com.jnape.palatable.lambda.functor.Contravariant Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lambda Show documentation
Show all versions of lambda Show documentation
Functional patterns for Java
package com.jnape.palatable.lambda.functor;
import com.jnape.palatable.lambda.functions.Fn1;
/**
* The contravariant functor (or "co-functor"); that is, a functor that maps contravariantly (A <- B
)
* over its parameter.
* Contravariant functors are not necessarily {@link Functor}s.
*
* For more information, read about
* Contravariant Functors.
*
* @param the type of the parameter
* @param the unification parameter
* @see Profunctor
*/
public interface Contravariant> {
/**
* Contravariantly map A <- B
.
*
* @param fn the mapping function
* @param the new parameter type
* @return the mapped Contravariant functor instance
*/
Contravariant contraMap(Fn1 super B, ? extends A> fn);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy