Transcong.fed: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/style/transcong.bend as Transcong Lines 95-105 of bolt@1.27.0.0/src/rules/style/transcong.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/style/transcong.bend&start_line=95&end_line=105 import Base import bolt@1.27.0.0/src/syntax/tree.bend as Tree # from here on in a group's kids, does the fifth or sixth argument open with # an `Equal.cong` call? nc: the commas so far; fresh: an argument opens here; # seen: one did already def fed(nn: Tree.Node, +nc: Nat, +fresh: Bool, +seen: Bool) -> Bool: match nn: case Tree.NCons{+h, +rest}: +here = Bool.and(fresh, Bool.and(late(nc), cong(Tree.NCons{h, rest}))) +cm = comma(h) fed(rest, Nat.add(nc, Bool.pick(Nat, cm, 1n, 0n)), cm, Bool.or(seen, here)) case _other: seen Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/style/transcong.bend&name=comma https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/style/transcong.bend&name=cong https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/style/transcong.bend&name=late https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node