def split
import bend-kit-resources@0.1.0.0/resources.bend as Resourcesimport Base
80# Splits n units off g. Whole hands back g when it holds fewer than n.
81def split(g: Grant, +n: Nat) -> Split:
82 Grant{+o, +a} = g
83 split.go(Nat.is_le(n, a), o, a, n)