[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash edb1e31 356/426: [-let] Add more tests
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash edb1e31 356/426: [-let] Add more tests |
Date: |
Tue, 04 Aug 2015 19:38:51 +0000 |
branch: externals/dash
commit edb1e317594afc09b4861e9bce344d7f1679617a
Author: Matus Goljer <address@hidden>
Commit: Matus Goljer <address@hidden>
[-let] Add more tests
---
dev/examples.el | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/dev/examples.el b/dev/examples.el
index 487a4b1..75e1918 100644
--- a/dev/examples.el
+++ b/dev/examples.el
@@ -799,7 +799,17 @@ new list."
(-let [(&keys :foo a :bar b) (list 1 2 :bar 4 :foo 3)] (list a b)) => '(3
4)
(-let [(a b (c _ _ &keys :foo [d _ (&alist :bar (e &keys :baz f) :qux
(&plist :fux g))] :mux h) i)
(list 1 2 (list 3 'skip 'skip :foo (vector 4 'skip (list (cons :bar
(list 5 :baz 6)) (cons :qux (list :fux 7)))) :mux 8) 9)]
- (list a b c d e f g h i)) => '(1 2 3 4 5 6 7 8 9))
+ (list a b c d e f g h i)) => '(1 2 3 4 5 6 7 8 9)
+ ;; single-binding optimization for vectors and kv
+ (-let [[_ [_ [_ a]]] (vector 1 (vector 2 (vector 3 4)))] a) => 4
+ (-let [[a _ _ _] (vector 1 2 3 4)] a) => 1
+ (-let [[_ _ _ a] (vector 1 2 3 4)] a) => 4
+ (-let [[_ _ a _] (vector 1 2 3 4)] a) => 3
+ (-let [[a [_ [_ b]]] (vector 1 (vector 2 (vector 3 4)))] (list a b)) =>
'(1 4)
+ (-let [[(a _ b)] (vector (list 1 2 3 4))] (list a b)) => '(1 3)
+ (-let [(&plist 'a a) (list 'a 1 'b 2)] a) => 1
+ (-let [(&plist 'a [a b]) (list 'a [1 2] 'b 3)] (list a b)) => '(1 2)
+ (-let [(&plist 'a [a b] 'c c) (list 'a [1 2] 'c 3)] (list a b c)) => '(1 2
3))
(defexamples -let*
(-let* (((a . b) (cons 1 2))
- [elpa] externals/dash 947ffda 341/426: Add support for &rest match for non-list sequences (like . for improper lists), (continued)
- [elpa] externals/dash 947ffda 341/426: Add support for &rest match for non-list sequences (like . for improper lists), Phillip Lord, 2015/08/04
- [elpa] externals/dash 9065e1b 344/426: [-let] Final cdr shift optimization, Phillip Lord, 2015/08/04
- [elpa] externals/dash d37947a 332/426: Add -tree-seq, Phillip Lord, 2015/08/04
- [elpa] externals/dash 51a0c9f 350/426: [-let] Fix expansion of _ symbols in vector matcher, Phillip Lord, 2015/08/04
- [elpa] externals/dash 8f9fc41 340/426: Add support for multiple input arguments to -lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7f2b3c7 343/426: [-lambda] test all match-forms before converting to regular lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6f81492 346/426: [-lambda] Better error-handling, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6f0bb7d 348/426: [-let] Fix dynamic scoping issue, Phillip Lord, 2015/08/04
- [elpa] externals/dash f939201 347/426: [-let] Optimize shifting/binding of unused _ places, Phillip Lord, 2015/08/04
- [elpa] externals/dash c1d555b 355/426: [-let] Optimize single-binding of vectors and kv, Phillip Lord, 2015/08/04
- [elpa] externals/dash edb1e31 356/426: [-let] Add more tests,
Phillip Lord <=
- [elpa] externals/dash 9ec1a02 354/426: [-let] Abstract the _ test into a function, Phillip Lord, 2015/08/04
- [elpa] externals/dash 31f321a 358/426: Release 2.9.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 40849a7 357/426: [-let] Remove stale comment, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2626840 336/426: Add -fixfn, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2436bf8 361/426: Add debug declaration on -lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4d67b25 345/426: [-let] Do not reinvent `pop', Phillip Lord, 2015/08/04
- [elpa] externals/dash f7664c6 352/426: [-let] Add &keys support for cons matcher, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4b63be1 362/426: Declare --mapcat macro before using it. #102, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0310e0e 359/426: Update docs, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0fc5d73 351/426: [-let] Make the cons matcher temp-bind as late as possible, Phillip Lord, 2015/08/04