def clamp_limit

bend-collections@1.0.0.0 · src/containers/dynamic_array.bend:49

import bend-collections@1.0.0.0/src/containers/dynamic_array.bend as DynamicArray
import Base

49# Depth limit min(k, 31). (Written with an explicit match: Base Nat.min is a
50# Bool.pick over shared arguments, which miscompiled at runtime; docs/VALIDATION.md.)
51def clamp_limit(k: Nat, small: Bool) -> Nat:
52  match small:
53    case True{}:
54      k
55    case False{}:
56      max_depth()

Uses (3)

Used by (4)