def binds
import bolt@1.27.0.0/src/rules/laws/closed.bend as Closedimport Base
import bolt@1.27.0.0/src/syntax/tree.bend as Tree
16# does a law's body bind anything (a `for` or `exs` line)?
17def binds(body: Tree.Node) -> Bool:
18 match body:
19 case Tree.NCons{Tree.Stmt{Tree.SFor{}, kids, b}, rest}:
20 True{}
21 case Tree.NCons{h, rest}:
22 binds(rest)
23 case other:
24 False{}