def below

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

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

89# Whether every entry is below the extent.
90def below(entries: List<&2, U32>, +extent: Nat) -> Bool:
91  match entries:
92    case Nil{}:
93      True{}
94    case head <> rest:
95      Bool.and(Nat.is_lt(U32.to_nat(head), extent), below(rest, extent))

Uses (7)

Used by (4)