def commas

bolt@1.27.0.0 · src/rules/style/transcong.bend:83

import bolt@1.27.0.0/src/rules/style/transcong.bend as Transcong
import Base
import bolt@1.27.0.0/src/syntax/tree.bend as Tree

83# the comma leaves among a chain's own nodes
84def commas(nn: Tree.Node) -> Nat:
85  match nn:
86    case Tree.NCons{h, rest}:
87      Nat.add(Bool.pick(Nat, comma(h), 1n, 0n), commas(rest))
88    case _other:
89      0n

Uses (5)

Used by (1)