Package hydra.lib.maybes
Class IsJust
java.lang.Object
hydra.tools.PrimitiveFunction
hydra.lib.maybes.IsJust
Checks if value is Just.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class hydra.tools.PrimitiveFunction
term, toNative
-
Constructor Details
-
IsJust
public IsJust()
-
-
Method Details
-
name
Returns the name of this primitive function.- Specified by:
namein classPrimitiveFunction- Returns:
- the name "hydra.lib.maybes.isJust"
-
type
Returns the type scheme of this primitive function.- Specified by:
typein classPrimitiveFunction- Returns:
- the type scheme for checking if an optional is present
-
implementation
Returns the implementation of this primitive function.- Specified by:
implementationin classPrimitiveFunction- Returns:
- a function that checks if an optional value is present
-
apply
Checks if an optional value is present (Just).- Type Parameters:
X- the value type- Parameters:
opt- the optional value to check- Returns:
- true if the optional contains a value, false otherwise
-