@Override public K apply(K k) { if (isRHS() && !isLHS()) { if (cache.containsKey(k)) { return cache.get(k); } } if (isLHS() && !isRHS()) { if (usedOnRhs.contains(k)) { return KAs(super.apply(k), cache.get(k), Att.empty().add(Sort.class, cache.get(k).att().get(Sort.class))); } } return super.apply(k); } }.apply(term);
return super.apply(k);