def storage_new
bendtorch-core@0.1.0.0 · src/tensor/allocation_PROOF.bend:44
import bendtorch-core@0.1.0.0/src/tensor/allocation_PROOF.bend as AllocationPROOF
import Base
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage
import bendtorch-core@0.1.0.0/src/storage/api.bend as Api
import bendtorch-core@0.1.0.0/src/tensor/allocation_spec.bend as Allocation
44def storage_new(+word: U32, +fill: F32, +within: {U32.is_le(word, 1048576) == True{} : Bool}) ->
45 {Allocation.storage_length(Storage.new(word, fill)) == Some{U32.to_nat(word)} : Maybe<&2, Nat>}:
46 new_checked_length(U32.to_nat(word), fill, U32.is_le(word, 1048576), within, Api.cap_from(word, within))