[Top][All Lists]

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

Re: [PATCH] Re: Creating books with Scheme

From: Nicolas Sceaux
Subject: Re: [PATCH] Re: Creating books with Scheme
Date: Sun, 30 Aug 2009 12:12:19 +0200

Le 30 août 09 à 03:20, Carl Sorensen a écrit :

On 8/29/09 7:01 PM, "Reinhold Kainhofer" <address@hidden> wrote:

You mean something like this patch:


Just a question. In your regression test, you first define (add-one- score
#f), then you set! it to a lambda function.

Is that solely so that you can have pitch defined in the lexical scope but outside of add-one-score? Or is there more going on that I haven't figured

Yes, that's to build a closure.
Now, as there is only one function using pitch, it can be simplied to
(define add-one-score
   (let ((pitch 0))
     (lambda (parser) ...)))

reply via email to

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