cyclops.arrow.FunctionsHK Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cyclops-pure Show documentation
Show all versions of cyclops-pure Show documentation
Platform for Functional Reactive Programming with Java 8
The newest version!
package cyclops.arrow;
import com.oath.cyclops.hkt.Higher;
import cyclops.function.Function1;
import cyclops.typeclasses.functor.Functor;
import cyclops.typeclasses.monad.Monad;
import java.util.function.Function;
public interface FunctionsHK {
public static Function1,Higher> liftNT(Function super T, ? extends R> fn,
Function super Higher,? extends Higher> hktTransform,
Functor functor){
return (T1)-> functor.map(fn,hktTransform.apply(T1));
}
public static Function1 super T,? extends Higher> arrow(Monad monad){
return t-> monad.unit(t);
}
}