def reserve

bend-kit-resources@0.1.0.0 · resources.bend:54

import bend-kit-resources@0.1.0.0/resources.bend as Resources
import Base

54# Takes n units when they fit. Refused hands back the pool unchanged.
55def reserve(p: Pool, +n: Nat) -> Reserve:
56  Pool{o, +c, +h} = p
57  reserve.go(Nat.is_le(Nat.add(h, n), c), o, c, h, n)

Uses (6)

Used by (4)