1 /* Substitute new expr for old expr in expr.
9 Output: Result on stack
20 p3
= pop(); // new expr
21 p2
= pop(); // old expr
22 if (p2
== symbol(NIL
) || p3
== symbol(NIL
)) {
28 p4
= alloc_tensor(p1
->u
.tensor
->nelem
);
29 p4
->u
.tensor
->ndim
= p1
->u
.tensor
->ndim
;
30 for (i
= 0; i
< p1
->u
.tensor
->ndim
; i
++)
31 p4
->u
.tensor
->dim
[i
] = p1
->u
.tensor
->dim
[i
];
32 for (i
= 0; i
< p1
->u
.tensor
->nelem
; i
++) {
33 push(p1
->u
.tensor
->elem
[i
]);
37 p4
->u
.tensor
->elem
[i
] = pop();
40 } else if (equal(p1
, p2
))
42 else if (iscons(p1
)) {