def ends
import bolt@1.27.0.0/src/rules/suspicious/thunk.bend as Thunkimport Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex
import bolt@1.27.0.0/src/syntax/tree.bend as Tree
57# does the lambda's body end after the call: the chain ends, or a comma?
58def ends(nn: Tree.Node) -> Bool:
59 match nn:
60 case Tree.NCons{Tree.Leaf{Lex.Tok{k, _t, _l, _c}}, _rest}:
61 Lex.is_comma(k)
62 case Tree.NCons{_h, _rest}:
63 False{}
64 case _other:
65 True{}