def at_head

bendtorch-core@0.1.0.0 · src/autograd/tensor_backward.bend:131

import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackward
import Base

131# Whether the head of a newest-first list of count elements has id `id`.
132def at_head(+count: Nat, +id: Nat) -> Bool:
133  match count:
134    case 0n:
135      False{}
136    case 1n+below:
137      Nat.is_eq(below, id)

Uses (3)

Used by (31)