// BeamRule determines what we do when we evaluate two adjacent notes
enum BeamRule {
case split // separate them
case drop // drop both
case keep // keep together
}
private static let beamRulesV2: [(NoteViewModel, NoteViewModel) -> BeamRule] = [
{ $0.note.rest || $1.note.rest ? .split : .keep },
]
created a new type of beam rule function: