def written

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

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

207# The entries as a balanced U32 array that a cell reads in a few steps: the
208# smallest depth that holds them, as Storage allocates.
209def written(entries: List<&2, U32>, array: Array<U32>, +at: U32) -> Array<U32>:
210  match entries:
211    case Nil{}:
212      array
213    case head <> rest:
214      written(rest, Array.set(U32, array, at, head), U32.add(at, 1))

Uses (5)

Used by (1)