def new_checked

bend-collections-laws-math@1.0.0.0 · proofs/lib/lemmas/src/cache.bend:15

import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/cache.bend as Cache
import Base

15def new_checked(-K: Data, -V: Data, capacity: Nat, valid: Bool) -> Result<&2, &2, String, Cache<K, V>>:
16  match valid:
17    case False{}:
18      Fail{"invalid capacity or size"}
19    case True{}:
20      Done{init(K, V, capacity)}

Uses (6)

Used by (0)

No other definition uses this definition.