public class JIPCons extends JIPTerm
JIPTerm
,
Serialized FormModifier and Type | Method and Description |
---|---|
static JIPCons |
append(JIPCons cons1,
JIPCons cons2)
Returns a new JIPCons object by appending cons2 to cons1
|
static JIPCons |
create(JIPTerm head,
JIPTerm tail)
Creates a new cons object
|
JIPTerm |
getHead()
Returns the head of this JIPCons object
|
int |
getHeight()
Returns the number of elements in this cons object.
|
JIPTerm |
getNth(int n)
Returns the nth term in this cons.
|
JIPTerm |
getTail()
Returns the tail of this JIPCons object
|
boolean |
isNIL()
Returns true if this cons is nil.
|
JIPCons |
reverse()
Returns a new JIPCons object by reversing this JIPCons object
|
public static final JIPCons NIL
public static final JIPCons create(JIPTerm head, JIPTerm tail)
head
- the head of the constail
- the tail the consJIPTerm
public static final JIPCons append(JIPCons cons1, JIPCons cons2)
cons1
- first conscons2
- cons to append at the end of the first one.public final JIPCons reverse()
public final JIPTerm getHead()
JIPTerm
public final JIPTerm getTail()
JIPTerm
public final JIPTerm getNth(int n)
n
- index ot the term to extractJIPTerm
public final boolean isNIL()
public final int getHeight()