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

cyclops.typeclasses.Pure Maven / Gradle / Ivy

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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy