def has_arrow
import bolt@1.27.0.0/src/rules/calls.bend as Callsimport Base
import bolt@1.27.0.0/src/syntax/tree.bend as Tree
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
277# does a chain hold a top-level `->`?
278def has_arrow(pp: Tree.Node) -> Bool:
279 match pp:
280 case Tree.NCons{h, rest}:
281 Lazy.or_else(kind.leaf(~kind.arrow, h), _u => has_arrow(rest))
282 case other:
283 False{}