lilypond-user
[Top][All Lists]
Advanced

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

Re: checking grob type


From: David Kastrup
Subject: Re: checking grob type
Date: Fri, 17 Mar 2017 18:15:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

David Nalesnik <address@hidden> writes:

> On Fri, Mar 17, 2017 at 9:50 AM, Paul <address@hidden> wrote:
>> cc'ing lilypond-devel to move discussion there.
>>
>> On 03/17/2017 09:38 AM, David Nalesnik wrote:
>>
>>> You can get more info about public functions with the attached file.
>>> I was planning on getting documentation into the manuals somehow, but
>>> I got hung up with getting the parameters of curried functions.
>>
>>
>> Hi David,  Thanks for your work on this.  Is there an easy way to just omit
>> any curried functions in a first-pass at this?  (I wonder what percentage
>> are curried?)
>
> I never found it.
>
> The problem is that a parameter isn't shown:
>
> #(define ((curried arg) grob) '())
> #(display curried)
>
> ==> #<procedure curried (arg)>

What problem?  `arg' _is_ the only parameter of the function `curried'.
The function `curried', when called, returns a function taking a single
parameter `grob'.

But that's a detail of the description.  Remember that the above
currying is just short for

(define (curried arg)
  (lambda (grob)
     '()))

which is short for

(define curried
  (lambda (arg)
    (lambda (grob) '())))

-- 
David Kastrup



reply via email to

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