def St.fill

bendtorch-load@1.3.0.0 · main.bend:502

import bendtorch-load@1.3.0.0/main.bend as BendtorchLoad
import Base

502# every tensor of es, in order, into consecutive cells from at
503def St.fill(es: List<&2, Entry>, +path: String, +start: W64, +recs: List<&2, Rec>, f: File, a: Array<F32>, +at: U32) -> IO(Array<F32>):
504  match es:
505    case Nil{}:
506      do IO<Array<F32>>:
507        File.close(f)
508        return a
509    case Con{+e, t}:
510      St.then(path, St.plan(start, e, St.find(recs, St.entry_name(e))), f, a, at, f2 => a2 => +n => St.fill(t, path, start, recs, f2, a2, (at + n : U32)))

Uses (19)

Used by (1)