BendtorchLoad.cells_of: def of bendtorch-load@1.3.0.0 Import: import bendtorch-load@1.3.0.0/main.bend as BendtorchLoad Lines 206-211 of bendtorch-load@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-load@1.3.0.0/main.bend&start_line=206&end_line=211 import Base # the number of F32 cells in a file (a packed-moment checkpoint carries its own sizes: its length is the file's) def cells_of(+path: String) -> IO(U32): do IO: f : File <- IO.try(File, File.open(path, "r")) rr : File & Result<&1, &1, U32 & String, U32> <- File.size(f) cells_done(rr) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File.open https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File.size https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.try https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=cells_done