[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: adding a markup ("sim.") to the end of a SustainPedalBracket
From: |
Thomas Morley |
Subject: |
Re: adding a markup ("sim.") to the end of a SustainPedalBracket |
Date: |
Mon, 28 Dec 2015 23:59:12 +0100 |
2015-12-28 23:13 GMT+01:00 David Kastrup <address@hidden>:
> Thomas Morley <address@hidden> writes:
>
>> Though I'm not sure with the following one. May I ask: curried or not?
>> (define (foo a b)
>> (let ((x2 (lambda (arg) (* 2 arg))))
>> (map x2 (list a b))))
>
> Why would that one be curried? It's completely boring, returns a list,
> and its internal function x2 is totally straightforward (not even a
> closure) and is invisible to the caller.
>
> Slightly more interesting is
>
> (define (fie a)
> (lambda (x) (+ x a)))
>
> which is equivalent to the curried definition
>
> (define ((fie a) x) (+ x a))
>
> However, the currying is not a feature of the semantics (the semantics
> of returning a function or more often a closure, namely a function with
> an environment in the form of variables imported into its scope) but of
> the syntax.
>
> So while the second definition of fie is a curried definition, the first
> equivalent definition isn't.
>
> --
> David Kastrup
Indeed interesting.
Thanks again,
Harm