diff --git a/src/main/java/net/kemitix/mon/Functor.java b/src/main/java/net/kemitix/mon/Functor.java index 0111ca1..7dc4fa1 100644 --- a/src/main/java/net/kemitix/mon/Functor.java +++ b/src/main/java/net/kemitix/mon/Functor.java @@ -34,18 +34,19 @@ import java.util.function.Function; * * * @param the type of the Functor + * @param the type of the mapped Functor * * @author Tomasz Nurkiewicz (?@?.?) */ -public interface Functor { +public interface Functor> { /** * Applies the function to the value within the Functor, returning the result within a Functor. * * @param f the function to apply - * @param the type of the result of the function + * @param the type of the content of the mapped functor * * @return a Functor containing the result of the function {@code f} applied to the value */ - Functor map(Function f); + F map(Function f); } diff --git a/src/main/java/net/kemitix/mon/Identity.java b/src/main/java/net/kemitix/mon/Identity.java index 1300d7d..4b4df37 100644 --- a/src/main/java/net/kemitix/mon/Identity.java +++ b/src/main/java/net/kemitix/mon/Identity.java @@ -33,7 +33,7 @@ import java.util.function.Function; * @author Paul Campbell (pcampbell@kemitix.net) */ @RequiredArgsConstructor -class Identity implements Functor { +class Identity implements Functor> { private final T value; diff --git a/src/main/java/net/kemitix/mon/Mon.java b/src/main/java/net/kemitix/mon/Mon.java index 8abe82d..b591044 100644 --- a/src/main/java/net/kemitix/mon/Mon.java +++ b/src/main/java/net/kemitix/mon/Mon.java @@ -37,7 +37,7 @@ import java.util.function.Supplier; * @author Paul Campbell (pcampbell@kemitix.net) */ @RequiredArgsConstructor(access = AccessLevel.PROTECTED) -public class Mon implements Functor { +public class Mon implements Functor> { /** * The value.