def fits

bend-collections-laws-math@1.0.0.0 · src/math/generic.bend:47

import bend-collections-laws-math@1.0.0.0/src/math/generic.bend as Generic
import 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)