code: public static Function fillParas(Function func, int ofs, Object[] paras) {
          int i;
  
          if (func == null) {
              throw new NullPointerException();
          }
  
          for (i = 0; i < paras.length; i++) {
              // ofs is not changed!
              func = Composition.create(func, ofs,
                                        new Constant(paras[i].getClass(),
                                                     "arg"+i, paras[i]));
              if (func == null) {
                  throw new RuntimeException();
              }
          }
          return func;
  
      }
docs: Replaces arguments to Functions by Constant Functions. Results in
  Functions with fewer arguments.
  @param  func  Functions whose arguments are filled in
  @param  ofs   first argument to be filled
  @param  paras Values for Constants used to fill arguments
  @return       Function with filled arguments.