Package net.hydromatic.morel.eval
Interface MutableEvalEnv
-
- All Superinterfaces:
EvalEnv
- All Known Implementing Classes:
EvalEnvs.MutableArraySubEvalEnv,EvalEnvs.MutablePatSubEvalEnv,EvalEnvs.MutableSubEvalEnv
public interface MutableEvalEnv extends EvalEnv
An evaluation environment whose last entry is mutable.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidset(Object value)Puts a value into this environment.default booleansetOpt(Object value)Puts a value into this environment in a way that may not succeed.-
Methods inherited from interface net.hydromatic.morel.eval.EvalEnv
bind, bindMutable, bindMutableArray, bindMutablePat, fix, getOpt, valueMap, visit
-
-
-
-
Method Detail
-
set
void set(Object value)
Puts a value into this environment.
-
setOpt
default boolean setOpt(Object value)
Puts a value into this environment in a way that may not succeed.For example, if this environment is based on the pattern (x, 2) then (1, 2) will succeed and will bind x to 1, but (3, 4) will fail.
The default implementation calls
set(java.lang.Object)and always succeeds.
-
-