def depth_of

bendtorch-core@0.1.0.0 · src/storage/api.bend:250

import bendtorch-core@0.1.0.0/src/storage/api.bend as Api
import Base
import bendtorch-core@0.1.0.0/src/storage/model.bend as Model
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith

250def depth_of(+d: Nat, +n: Nat, +fits: {Storage.bounds(d, n) == True{} : Bool}) -> {Nat.is_le(d, 20n) == True{} : Bool}:
251  Arith.and_left(Nat.is_le(d, 20n), Bool.and(Nat.is_lt(0n, n), Nat.is_le(n, Model.capacity(d))), fits)

Uses (8)

Used by (1)