// manage dependency updates
IPersistentMap tempDependencies=this.dependencies;
IPersistentMap tempDependents=this.dependents;
IPersistentSet free=body.accumulateFreeSymbols(PersistentHashSet.EMPTY);
IPersistentSet oldDeps=(IPersistentSet) tempDependencies.valAt(key);
if ((oldDeps==null)) oldDeps=PersistentHashSet.EMPTY;
// update dependencies to match the free variables in the expression
tempDependencies=tempDependencies.assoc(key, free);
tempDependents=updateBackDeps(key,tempDependents,oldDeps,free);
// Compute which symbols cannot yet be bound from the current environment
IPersistentSet unbound=free;
for (ISeq s=RT.seq(unbound);s!=null; s=s.next()) {
Symbol sym=(Symbol) s.first();
if (isBound(sym)) {
unbound=unbound.disjoin(sym);
}
}
if (unbound.count()==0) {
Environment newEnv=body.compute(this, bindings);
Object value=newEnv.getResult();
newEnv = new Environment(map.assoc(key, Mapping.createExpression(body, value, null)),tempDependencies,tempDependents,value);
newEnv=updateDependents(newEnv,key);