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

com.jnape.palatable.lambda.functor.Contravariant Maven / Gradle / Ivy

There is a newer version: 5.5.0
Show newest version
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 fn); }