Functor: rewrite map() javadoc

This commit is contained in:
Paul Campbell 2017-09-19 23:10:31 +01:00
parent ccf3a11157
commit fdc4cad4e4

View file

@ -33,12 +33,12 @@ import java.util.function.Function;
public interface Functor<T> {
/**
* Map the content of the functor through the function.
* Applies the function to the value within the Functor, returning the result within a Functor.
*
* @param f the function
* @param <R> the type the functor maps to
* @param f the function to apply
* @param <R> the type of the result of the function
*
* @return the new functor
* @return a Functor containing the result of the function {@code f} applied to the value
*/
<R> Functor<R> map(Function<T, R> f);
}