- LY_ASSERT_TYPE (ly_is_procedure, func, 1);
- return make_music_function (signature, func);
-}
+ LY_ASSERT_TYPE (ly_is_list, signature, 1);
+ LY_ASSERT_TYPE (ly_is_procedure, func, 2);
+ int n = 0;
+ for (SCM p = signature; scm_is_pair (p); p = scm_cdr (p), ++n)
+ {
+ SCM proc = scm_car (p);
+ if (scm_is_pair (proc))
+ proc = scm_car (proc);
+ if (scm_is_false (scm_procedure_p (proc)))
+ {
+ scm_wrong_type_arg_msg ("music-function", n, p,
+ "music function predicate");
+ }
+ }