\version "2.19.82" % What do you want to achieve with this function? % return an object containing markup and score exampleA = #(define-scheme-function ()() ; create a (list (cons 'mup #{ \markup "Test" #}) (cons 'mus #{ \score { c'4 } #}) )) exA = \exampleA \exA.mup \exA.mus %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % add the markup and the score immediatly exampleB = #(define-scheme-function () () (add-score (list #{ \markup "Test" #})) (add-score #{ \score { c'4 } #} )) \exampleB %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % return a function that adds markup and score exampleC = #(define-scheme-function (mup mus) (markup? ly:score?) (define-void-function ()() (add-score (list mup)) (add-score mus) )) exC = \exampleC Test \score { c'4 } \exC