mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-21 15:57:19 +00:00
create monad and functor interfaces
This commit is contained in:
1 parent
a6b193503d
commit
97854e3037
2 files changed
+16
No files matched your search
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user