def unrecorded
import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackwardimport Base
1307# A refused sum drops the product, the newest entry, so the tape comes back
1308# as it was before the product was recorded.
1309def unrecorded(pair: Tape & Result<&2, &2, Error, Nat>) -> Tape & Result<&2, &2, Error, Nat>:
1310 (tape, result) = pair
1311 match result:
1312 case Fail{error}:
1313 (popped(tape), Fail{error})
1314 case Done{id}:
1315 (tape, Done{id})