def Fin.unpack

bendtorch-core@0.1.0.0 · src/shape/core.bend:123

import bendtorch-core@0.1.0.0/src/shape/core.bend as Core
import Base

123def Fin.unpack(+a: Nat, +b: Nat, index: Fin(Nat.mul(a, b))) -> Fin(a) & Fin(b):
124  match a:
125    case 0n:
126      match index:
127    case 1n+p:
128      Fin.unpack.step(p, b, index => Fin.unpack(p, b, index), Fin.split(b, Nat.mul(p, b), index))

Uses (6)

Used by (7)