lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ly:make-music-function issue (bug?)


From: Daniel Schmolze
Subject: ly:make-music-function issue (bug?)
Date: Sun, 26 Mar 2006 16:54:07 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

I've written a function that accepts three arguments and returns a function that
accepts some music. The function looks like this (for the purposes of this 
post):

#(define (foo a b c) (lambda (m) m))

Now, this works fine:

{ \applyMusic #(foo 1 2 3) {a' b' c''} }

However, I'd like to be able to do the following:

{ \foo #1 #2 #3 {a' b' c''} }

So I tried this:

blah = #(ly:make-music-function
        (list number? number? number? ly:music?)
        (lambda (parser location a b c music)
          ((foo a b c) music)))

{ \blah #1 #2 #3 {a' b' c''} }

Which gives me "error: can't find signature for music function".

Now here's the odd part. If I change the function to accept less than three
arguments, everything works as expected:

#(define (foo a b) (lambda (m) m))

blah = #(ly:make-music-function
        (list number? number? ly:music?)
        (lambda (parser location a b music)
          ((foo a b) music)))

{ \blah #1 #2 {a' b' c''} }

What gives?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]