def Pulls

bendtorch-core@0.1.0.0 · src/autograd/tensor_chain_PROOF.bend:18

import bendtorch-core@0.1.0.0/src/autograd/tensor_chain_PROOF.bend as TensorChainPROOF
import Base
import bendtorch-core@0.1.0.0/src/autograd/gradient.bend as Gradient
import bendtorch-core@0.1.0.0/src/autograd/tensor_chain_LAWS.bend as Laws

18def Pulls(pending: List<&1, Gradient.Slot>, -slots: List<&1, Gradient.Slot>, +count: Nat, -log: Laws.Log()) -> Data:
19  match pending count:
20    case Nil{} count:
21      {slots == Nil{} : List<&1, Gradient.Slot>}
22    case Con{x, rest} 0n:
23      {slots == x <> rest : List<&1, Gradient.Slot>}
24    case Con{x, rest} 1n+below:
25      Cell<x, rest, slots, below, log>

Uses (5)

Used by (8)