[Top][All Lists]

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

Re: [PATCH] Clojure-like syntactic sugar for an anonymous function liter

From: Oleh
Subject: Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal
Date: Wed, 21 Jan 2015 23:37:31 +0100

Thanks for the input,

> Some parts of short-lambda's documentation is unclear to me. I have no
> experience with Clojure, so this is all from the perspective of someone new
> to short-lambda.
>> 2. In the case when `%1' is the highest-ranking argument, it may be
>> abbreviated to `%'.
> When '%1' is the highest-ranking argument, that means '%1' is the only
> argument, correct? I think this point will be more accessible if we don't
> rely on the reader knowing or correctly inferring what "highest-ranking"
> means, and use something along the lines of "when %1 is the only argument"
> instead.

Fixed with your suggestion. The point is not to mix % and e.g. %2.
Clojure allows this, for not particular reason.

>> 3. The lower-ranking arguments are auto-added, even if they are not
>> present in FORMS.
> Auto-added to the list of arguments? Similar to my above point, it will be
> better if we can remove the dependency on "lower-ranking", and explain what
> we mean by that term (something like "all arguments with a smaller number
> than the argument with the largest number are included as part of the
> lambda's arguments, even if they do not appear in STRUCTURE").

This means:

    (short-lambda (list %3)) => (lambda (%1 %2 %3) (list %3))


reply via email to

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