def write_f32
import bendtorch@1.3.0.0/main.bend as Bendtorchimport Base
3634# cells 0 .. n - 1 of a, as little-endian F32, into a new file at path; a comes back
3635def write_f32(+path: String, a: Array<F32>, +n: U32) -> IO(Array<F32>):
3636 do IO<Array<F32>>:
3637 f : File <- IO.try(File, File.open(path, "w"))
3638 r : File & Array<F32> <- write_chunks(U32.to_nat(U32.div((n + U32.sub(WCHUNK(), 1) : U32), WCHUNK())), f, a, 0, n)
3639 wf_close(r)