def length

bendtorch-core@0.1.0.0 · src/tensor/gather_LAWS.bend:31

import bendtorch-core@0.1.0.0/src/tensor/gather_LAWS.bend as GatherLAWS
import Base

31# How many entries an index holds.
32def length(entries: List<&2, U32>) -> Nat:
33  match entries:
34    case Nil{}:
35      0n
36    case head <> rest:
37      1n+length(rest)

Uses (3)

Used by (9)