add bifunctor

This commit is contained in:
dfsek
2025-12-29 17:08:40 -07:00
parent f03f39f1d7
commit 292be6bcec

View File

@@ -0,0 +1,14 @@
package com.dfsek.terra.api.util.generic.data;
import java.util.function.Function;
public interface BiFunctor<T, U, B extends BiFunctor<?, ?, B>> extends Functor<T, B> {
@Override
default <V> BiFunctor<V, U, B> map(Function<T, V> map) {
return mapLeft(map);
}
<V> BiFunctor<V, U, B> mapLeft(Function<T, V> map);
<V> BiFunctor<T, V, B> mapRight(Function<U, V> map);
}