def groups

bolt@1.27.0.0 · src/syntax/tree.bend:210

import bolt@1.27.0.0/src/syntax/tree.bend as Tree
import Base

210# how many groups sit open on top of the stack
211def groups(stack: List<&2, Frame>) -> Nat:
212  match stack:
213    case Con{FGroup{open, kids}, rest}:
214      Succ{groups(rest)}
215    case other:
216      0n

Uses (3)

Used by (1)