Package hydra.lib.lists
Class Group
java.lang.Object
hydra.tools.PrimitiveFunction
hydra.lib.lists.Group
Groups consecutive equal elements.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class hydra.tools.PrimitiveFunction
term, toNative
-
Constructor Details
-
Group
public Group()
-
-
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
Groups consecutive equal elements.- Type Parameters:
X- the element type- Parameters:
lst- the list to group- Returns:
- the list of groups of consecutive equal elements
-