mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-05 23:36:06 +00:00
create monad and functor interfaces
This commit is contained in:
@@ -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