Core.digits_words: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/shape/core.bend as Core Lines 409-415 of bendtorch-core@0.1.0.0/src/shape/core.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&start_line=409&end_line=415 import Base def digits_words(dims: List<&2, U32>, +index: Nat) -> List<&2, Nat>: match dims: case Nil{}: Nil{} case head <> +tail: +stride = numel_words(tail) Nat.div(index, stride) <> digits_words(tail, Nat.mod(index, stride)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mod https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=numel_words