def all_below

bendtorch-core@0.1.0.0 · src/autograd/reduce_parallel_proof.bend:190

import bendtorch-core@0.1.0.0/src/autograd/reduce_parallel_proof.bend as ReduceParallelProof
import Base

190# Every masked position lies inside the contribution.
191def all_below(positions: List<&2, Nat>, +bound: Nat) -> Bool:
192  match positions:
193    case Nil{}:
194      True{}
195    case position <> rest:
196      Bool.and(Nat.is_lt(position, bound), all_below(rest, bound))

Uses (5)

Used by (9)