コード例 #1
0
 public Object toPrefix() {
   Object r = Lisp.list(coef[coef.length - 1].toPrefix());
   Object x = var.toPrefix();
   for (int i = coef.length - 1; i > 0; i--) {
     r = Lisp.list(Lisp.cons("*", Lisp.cons(x, r)));
     if (!coef[i - 1].equals(Zahl.ZERO)) {
       r = Lisp.list(Lisp.cons("+", Lisp.cons(coef[i - 1].toPrefix(), r)));
     }
   }
   return Lisp.car(r);
 }