public abstract static class Value.List extends Value.Option
Value.Option.
Note that the tail (tl) of a non-empty List must itself be a List.| Modifier and Type | Class and Description |
|---|---|
static class |
Value.List.Cell
A List Cell; also see
NIL. |
Value.Option.GPValue.Atomic, Value.Bool, Value.Char, Value.Chars, Value.Cts, Value.Defer, Value.Discrete, Value.Enum, Value.Inc_Or, Value.Int, Value.Lambda, Value.List, Value.Maybe, Value.Option, Value.Real, Value.Scannable, Value.Structured, Value.Triv, Value.Tuple| Modifier and Type | Field and Description |
|---|---|
static Value.List |
NIL
The empty list, NIL; also see
Value.List.Cell. |
| Constructor and Description |
|---|
List() |
| Modifier and Type | Method and Description |
|---|---|
Value |
elt(int i)
|
abstract Value |
hd()
The head (1st element) of the List.
|
abstract Value.Bool |
isNil()
Is 'this' List 'nil' (empty), or not?
|
void |
print(java.io.PrintStream ps)
Note, the tail of a List is printed iteratively.
|
abstract Value |
tl()
The tail (all but the
hd()) of the List. |
Type.Option |
type()
The
LIST Type, of course. |
AoM, elts, frth, fst, nlAoM, snd, thrd, toStringpublic static final Value.List NIL
Value.List.Cell.public Type.Option type()
LIST Type, of course.public Value elt(int i)
elt in class Value.Structuredpublic abstract Value.Bool isNil()
public abstract Value hd()
public void print(java.io.PrintStream ps)
print in class Value.Structured