def fits
import bend-collections-laws-math@1.0.0.0/src/math/generic.bend as Genericimport Base
47# x when it fits, else None
48def fits(-T: Data, over: Bool, +x: T) -> Maybe<&2, T>:
49 match over:
50 case True{}:
51 None{}
52 case False{}:
53 Some{x}
Uses (2)
Used by (41)
- bend-collections-laws-math@1.0.0.0/src/math/generic:cmul
- bend-collections-laws-math@1.0.0.0/src/math/generic:cadd
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32int:okfits
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u64int:okfits
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32int:powsim
- …