def capped

bendtorch-core@0.1.0.0 · src/tensor/signed.bend:156

import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed
import Base

156def capped(+bound: Nat, extents: List<&2, Extent>) -> Product:
157  match extents:
158    case Nil{}:
159      cap(bound, 1n)
160    case Exact{+size} <> tail:
161      times(bound, U32.to_nat(size), capped(bound, tail))
162    case Inferred{} <> tail:
163      capped(bound, tail)

Uses (7)

Used by (8)