cyclops.typeclasses.Pure 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.typeclasses;
import com.oath.cyclops.hkt.Higher;
/**
* Type class for creating instances of types
*
* @author johnmcclean
*
* @param The core type of the unit (e.g. the HKT witness type, not the generic type : ListType.µ)
*/
@FunctionalInterface
public interface Pure {
/**
* Create a new instance of the core type (e.g. a List or CompletableFuture) that is HKT encoded
*
* @param value To populate new instance of
* @return HKT encoded new instance with supplied value
*/
public Higher unit(T value);
}