All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cyclops.arrow.FunctionsHK Maven / Gradle / Ivy

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 fn,
                                                                         Function,? extends Higher> hktTransform,
                                                                         Functor functor){
    return (T1)-> functor.map(fn,hktTransform.apply(T1));
  }

  public static   Function1> arrow(Monad monad){
    return t-> monad.unit(t);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy