diff --git a/src/main/java/net/kemitix/mon/result/Result.java b/src/main/java/net/kemitix/mon/result/Result.java index ea0de64..70a81e7 100644 --- a/src/main/java/net/kemitix/mon/result/Result.java +++ b/src/main/java/net/kemitix/mon/result/Result.java @@ -21,6 +21,7 @@ package net.kemitix.mon.result; +import net.kemitix.mon.Functor; import net.kemitix.mon.maybe.Maybe; import java.util.function.Consumer; @@ -35,7 +36,7 @@ import java.util.function.Supplier; * @author Paul Campbell (pcampbell@kemitix.net) */ @SuppressWarnings("methodcount") -public interface Result { +public interface Result extends Functor> { /** * Creates a Result from the Maybe, where the Result will be an error if the Maybe is Nothing. @@ -124,13 +125,7 @@ public interface Result { */ Result flatMap(Function> f); - /** - * Applies the functions to the value of a successful result, while doing nothing with an error. - * - * @param f the mapping function to produce the new value - * @param the type of the result of the mapping function - * @return a Result - */ + @Override Result map(Function f); /**