
net.eusashead.parquet.util.Monad Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parquet-utils Show documentation
Show all versions of parquet-utils Show documentation
Parquet is a Java REST framework built on Yoke and Vert.x
The newest version!
package net.eusashead.parquet.util;
/**
* A very poor generic
* monad implementation in
* Java. I think it's not
* possible to do this properly
* without higher-kinded types
* or type classes.
* @author patrickvk
*
* @param
*/
public interface Monad {
/**
* Returns a {@link Monad}
* wrapping the supplied type T
* given a {@link Function} of
* that takes a parameter of F
* and returns a T. I believe
* for this to be a true monad
* it should really take a
* Monad rather than a raw F.
* I don't see a way to do this in
* Java without higher-kinded types
* @param function
* @return a {@link Monad} wrapping the result of the supplied {@link Function}
*/
abstract Monad bind(Function function);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy