LambdaFormBuffer replaceFunctions(NamedFunction[] oldFns,NamedFunction[] newFns,Object... forArguments){
  assert (inTrans());
  if (oldFns.length == 0)   return this;
  for (int i=arity; i < length; i++) {
    Name n=names[i];
    int nfi=indexOf(n.function,oldFns);
    if (nfi >= 0 && Arrays.equals(n.arguments,forArguments)) {
      changeName(i,new Name(newFns[nfi],n.arguments));
    }
  }
  return this;
}

LambdaFormBuffer replaceFunctions ( NamedFunction [ ] oldFns , NamedFunction [ ] newFns , Object ... forArguments ) { assert ( inTrans ( ) ) ; if ( oldFns . length == 0 ) return this ; for ( int i = arity ; i < length ; i ++ ) { Name n = names [ i ] ; int nfi = indexOf ( n . function , oldFns ) ; if ( nfi >= 0 && Arrays . equals ( n . arguments , forArguments ) ) { changeName ( i , new Name ( newFns [ nfi ] , n . arguments ) ) ; } } return this ; }
replace any name whose function is in oldfns with a copy whose function is in the corresponding position in newfns . only do this if the arguments are exactly equal to the given .
