public abstract static class Value.Defer extends Value
Value.Defer.Exp
and Value.Defer.App
. The action happens in
force()
. Also see Expression.defer(la.la.Environment)
.Modifier and Type | Class and Description |
---|---|
static class |
Value.Defer.App
A lazy, un-apply-ed, Deferred Function-application, a
(Function, actual-parameter)
pair.
|
static class |
Value.Defer.Exp
A lazy unevaluated, Deferred Expression is a closure, (e, r),
a
Expression , Environment ). |
Value.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 |
---|---|
protected Value |
v
v holds the once Deferred Value when (if) it is eventually
computed, by
force() , to at least WHNF. |
Constructor and Description |
---|
Defer() |
Modifier and Type | Method and Description |
---|---|
double |
AoM()
force(), and return the v.AoM of this Deferred Value.
|
Value |
apply(Value p)
force() the Function and return v.apply(p).
|
Value |
bOp(int op,
Value rgt)
All binary operators (other than 'cons') are strict on 'this', so
force() and return v.bOp(op,rgt) for binary operator 'op'.
|
Value |
elt(int i)
force(), and return the v.elt(i) of this Deferred Value.
|
abstract Value |
force()
Cause 'this' lazy, Deferred Value to be computed to at last WHNF
and cached in '
v '. |
int |
n()
force(), and return the v.n() of this Deferred Value.
|
int |
nElts()
force(), and return the v.nElts() of this Deferred Value.
|
double |
nlAoM()
force(), and return the v.nlAoM of this Deferred Value.
|
void |
print(java.io.PrintStream ps)
|
Type |
type()
force(), and return the v.type() of this Deferred Value.
|
Value |
uOp(int op)
All unary operators are strict, so force() 'this' and
return v.uOp(op).
|
double |
x()
force(), and return the v.x() of this Deferred Value.
|
public abstract Value force()
v
'.public void print(java.io.PrintStream ps)
public Value uOp(int op)
public Value bOp(int op, Value rgt)
public Type type()
public double x()
public double AoM()
public double nlAoM()
public int nElts()
public Value elt(int i)