Improve keyword arguments test
and key
.
#177
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Document the argument order of
test
as the first argument being the valuefrom the sequence and the second argument being the tested item. This is the
same order as used by
seq-contains-p
and the opposite ofcl-member
.loopy--member-p
, used for tests foradjoin
,union
, andnunion
.This function can be optimized during byte compilation via
loopy--member-p-comp
to becomemember
,memq
, ormemql
when possible,as done with
cl-member
.Simplify
loopy--plist-bind
into a wrapper aroundcl-destructuring-bind
.Add
loopy--instr-let2*
, with works likemacroexp-let2*
except that it willalso append variable-instructions to the result of the body as needed. This
will allow us to stop manually checking in each command whether we need to
create a variable to hold a value. Now, we create the variable is
macroexp-const-p
believes that the value would not be constant.Do not remove
key
. The use of a separate argument allows us to optimize thetransform function by only calling it once on the tested item
during the execution of each command. It is decided that re-creating
this behavior with
set
and an ignored argument in the test functionis too awkward.
See also issues #176, #170, and this PR.