
fj.data.$ Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of functionaljava Show documentation
Show all versions of functionaljava Show documentation
Functional Java is an open source library that supports closures for the Java programming language
The newest version!
package fj.data;
import fj.P1;
/**
* The constant arrow, for attaching a new name to an existing type. For every pair of types A and B, this type
* is the identity morphism from B to B.
*/
@SuppressWarnings("UnusedDeclaration")
public final class $ extends P1 {
private final B b;
private $(final B b) {
this.b = b;
}
/**
* Returns a function that given an argument, returns a function that ignores its argument.
* @return A function that given an argument, returns a function that ignores its argument.
*/
public static $ __(final B b) {
return constant(b);
}
public static $ constant(final B b) {
return new $<>(b);
}
public B _1() {
return b;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy