[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 396d6ac 271/426: Declare macro before using it.
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 396d6ac 271/426: Declare macro before using it. |
Date: |
Tue, 04 Aug 2015 19:38:13 +0000 |
branch: externals/dash
commit 396d6ac4fe0f0258711485fe7c11335665c2e90e
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>
Declare macro before using it.
---
dash.el | 40 ++++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/dash.el b/dash.el
index af6ab15..925b8e9 100644
--- a/dash.el
+++ b/dash.el
@@ -783,26 +783,6 @@ as `(nth i list)` for all i from INDICES."
(!cons (nth it list) r))
(nreverse r)))
-(defun -grade-up (comparator list)
- "Grades elements of LIST using COMPARATOR relation, yielding a
-permutation vector such that applying this permutation to LIST
-sorts it in ascending order."
- ;; ugly hack to "fix" lack of lexical scope
- (let ((comp `(lambda (it other) (funcall ',comparator (car it) (car
other)))))
- (->> (--map-indexed (cons it it-index) list)
- (-sort comp)
- (-map 'cdr))))
-
-(defun -grade-down (comparator list)
- "Grades elements of LIST using COMPARATOR relation, yielding a
-permutation vector such that applying this permutation to LIST
-sorts it in descending order."
- ;; ugly hack to "fix" lack of lexical scope
- (let ((comp `(lambda (it other) (funcall ',comparator (car other) (car
it)))))
- (->> (--map-indexed (cons it it-index) list)
- (-sort comp)
- (-map 'cdr))))
-
(defmacro -> (x &optional form &rest more)
"Threads the expr through the forms. Inserts X as the second
item in the first form, making a list of it if it is not a list
@@ -841,6 +821,26 @@ in in second form, etc."
(put '->> 'lisp-indent-function 1)
(put '--> 'lisp-indent-function 1)
+(defun -grade-up (comparator list)
+ "Grades elements of LIST using COMPARATOR relation, yielding a
+permutation vector such that applying this permutation to LIST
+sorts it in ascending order."
+ ;; ugly hack to "fix" lack of lexical scope
+ (let ((comp `(lambda (it other) (funcall ',comparator (car it) (car
other)))))
+ (->> (--map-indexed (cons it it-index) list)
+ (-sort comp)
+ (-map 'cdr))))
+
+(defun -grade-down (comparator list)
+ "Grades elements of LIST using COMPARATOR relation, yielding a
+permutation vector such that applying this permutation to LIST
+sorts it in descending order."
+ ;; ugly hack to "fix" lack of lexical scope
+ (let ((comp `(lambda (it other) (funcall ',comparator (car other) (car
it)))))
+ (->> (--map-indexed (cons it it-index) list)
+ (-sort comp)
+ (-map 'cdr))))
+
(defmacro -when-let (var-val &rest body)
"If VAL evaluates to non-nil, bind it to VAR and execute body.
VAR-VAL should be a (VAR VAL) pair."
- [elpa] externals/dash 87bcbc8 261/426: Merge pull request #59 from Fuco1/add-keywords, (continued)
- [elpa] externals/dash 87bcbc8 261/426: Merge pull request #59 from Fuco1/add-keywords, Phillip Lord, 2015/08/04
- [elpa] externals/dash 094fdea 262/426: Merge pull request #58 from Fuco1/fontlock-custom, Phillip Lord, 2015/08/04
- [elpa] externals/dash ca9b296 263/426: Add Cask-file., Phillip Lord, 2015/08/04
- [elpa] externals/dash 3bbaed5 256/426: Release 2.4.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 8005153 259/426: Add customize option to turn on font-lock for dash, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9de1435 248/426: Merge pull request #53 from Fuco1/tree-stuff, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7357283 258/426: Merge pull request #57 from Silex/master, Phillip Lord, 2015/08/04
- [elpa] externals/dash da9888f 266/426: Release 2.4.1, Phillip Lord, 2015/08/04
- [elpa] externals/dash 47af4d6 265/426: Merge pull request #61 from Fuco1/master, Phillip Lord, 2015/08/04
- [elpa] externals/dash c788474 264/426: Fix bug with nested lists in `-remove-at-indices`, Phillip Lord, 2015/08/04
- [elpa] externals/dash 396d6ac 271/426: Declare macro before using it.,
Phillip Lord <=
- [elpa] externals/dash 386ec0a 273/426: Add -same-items? function., Phillip Lord, 2015/08/04
- [elpa] externals/dash e7bc8fe 250/426: Make dash-specific font lock optional, Phillip Lord, 2015/08/04
- [elpa] externals/dash a84a434 267/426: 2.4.1 in readme-template too, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4818368 272/426: Release 2.4.3, Phillip Lord, 2015/08/04
- [elpa] externals/dash b661f96 269/426: Merge pull request #62 from Fuco1/consfix, Phillip Lord, 2015/08/04
- [elpa] externals/dash 25be31a 270/426: Release 2.4.2, Phillip Lord, 2015/08/04
- [elpa] externals/dash f86d235 268/426: Fix -cons*, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3eb91fe 280/426: Add `-find-last-index`, Phillip Lord, 2015/08/04
- [elpa] externals/dash ec9afcb 255/426: Merge pull request #54 from Fuco1/index/modify, Phillip Lord, 2015/08/04
- [elpa] externals/dash 930b390 278/426: Add -list function., Phillip Lord, 2015/08/04