struct RangedTerm { typealias Term = Cofree)> let term: Term } struct UnannotatedTerm { typealias Term = Cofree let term: Term } extension UnannotatedTerm: Arbitrary { static var arbitrary: Gen { let leaf: Gen = String.arbitrary.fmap { Term((), .Leaf($0)) } let indexed: Gen = Gen.sized { n in Gen.choose((0, n)).bind { n in sequence((0..