"Does @code{mus} belong to the music class @code{type}?"
(memq type (ly:music-property mus 'types)))
+(define-safe-public (music-type-predicate types)
+ "Returns a predicate function that can be used for checking
+music to have one of the types listed in @var{types}."
+ (if (cheap-list? types)
+ (lambda (m)
+ (any (lambda (t) (music-is-of-type? m t)) types))
+ (lambda (m) (music-is-of-type? m types))))
+
;; TODO move this
(define-public ly:grob-property
(make-procedure-with-setter ly:grob-property