def count

bendtorch-core@0.1.0.0 · src/tensor/gather.bend:82

import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather
import Base

82def count(entries: List<&2, U32>) -> Nat:
83  match entries:
84    case Nil{}:
85      0n
86    case head <> rest:
87      1n+count(rest)

Uses (3)

Used by (7)