Package hydra.lib.lists
Class Elem
java.lang.Object
hydra.tools.PrimitiveFunction
hydra.lib.lists.Elem
Checks if an element is in a list.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class hydra.tools.PrimitiveFunction
term, toNative
-
Constructor Details
-
Elem
public Elem()
-
-
Method Details
-
name
Description copied from class:PrimitiveFunctionThe unique name of the primitive function.- Specified by:
namein classPrimitiveFunction- Returns:
- the name of this primitive function
-
type
Description copied from class:PrimitiveFunctionThe datatype of the primitive function.- Specified by:
typein classPrimitiveFunction- Returns:
- the type scheme of this primitive function
-
implementation
Description copied from class:PrimitiveFunctionA dynamic/interpreted implementation of the function.- Specified by:
implementationin classPrimitiveFunction- Returns:
- the function implementation
-
apply
Checks if the element is present.- Type Parameters:
X- the element type- Parameters:
elem- the element to search for- Returns:
- a function that checks if the element is present in a list
-
apply
Checks if the element is present.- Type Parameters:
X- the element type- Parameters:
elem- the element to search forlst- the list to search in- Returns:
- true if present, false otherwise
-