Api.new_refused: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/storage/api.bend as Api Lines 726-739 of bendtorch-core@0.1.0.0/src/storage/api.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&start_line=726&end_line=739 import Base import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage import bendtorch-core@0.1.0.0/src/storage/LAWS.bend as Laws import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith def new_refused(+n: Nat, -value: F32, allowed: Bool, no: {False{} == allowed : Bool}, +positive: {Nat.is_lt(0n, n) == True{} : Bool}) -> {Laws.refused.of(Storage.new_checked(n, value, allowed)) == Some{Storage.TooLarge{}} : Maybe<&2, Storage.Error>}: match n: case 0n: Empty.absurd({Laws.refused.of(Storage.new_checked(0n, value, allowed)) == Some{Storage.TooLarge{}} : Maybe<&2, Storage.Error>}, Arith.clash(positive)) case 1n+p: match allowed: case False{}: {==} case True{}: Empty.absurd({Laws.refused.of(Storage.new_checked(1n+p, value, True{})) == Some{Storage.TooLarge{}} : Maybe<&2, Storage.Error>}, Arith.clash(no)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=refused.of https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/arith.bend&name=clash https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/main.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/main.bend&name=new_checked