create monad and functor interfaces

This commit is contained in:
dfsek
2022-08-14 19:14:47 -07:00
parent a6b193503d
commit 97854e3037
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
package com.dfsek.terra.api.util.function.functor;
import java.util.function.Function;
public interface Functor<T> {
<U> Functor<U> map(Function<T, U> map);
}

View File

@@ -0,0 +1,8 @@
package com.dfsek.terra.api.util.function.monad;
import java.util.function.Function;
public interface Monad<T> {
<U> Monad<U> bind(Function<T, Monad<U>> map);
}