def binary

bendtorch-core@0.1.0.0 · src/autograd/backward.bend:305

import bendtorch-core@0.1.0.0/src/autograd/backward.bend as Backward
import Base

305# Records `a op b`. An operand id the tape does not hold is refused with
306# UnknownNode, and the tape comes back unchanged.
307def binary(tape: Tape, kind: Binary, +a: Nat, +b: Nat) -> Tape & Result<&2, &2, Error, Nat>:
308  Tape{+entries} = tape
309  operands(entries, kind, a, b, value(Tape{entries}, a), value(Tape{entries}, b))

Uses (8)

Used by (6)