def inside

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

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

39# Whether every entry lies below the extent.
40def inside(entries: List<&2, U32>, +bound: Nat) -> Bool:
41  match entries:
42    case Nil{}:
43      True{}
44    case head <> rest:
45      Bool.and(Nat.is_lt(U32.to_nat(head), bound), inside(rest, bound))

Uses (7)

Used by (6)