Browse Source

Update dash

master
Daniel 1 month ago
parent
commit
9e4ea4591c
No known key found for this signature in database

elpa/dash-20210330.1544/dash-autoloads.el → elpa/dash-20210609.1330/dash-autoloads.el View File


elpa/dash-20210330.1544/dash-pkg.el → elpa/dash-20210609.1330/dash-pkg.el View File

@@ -1,6 +1,6 @@
1
-(define-package "dash" "20210330.1544" "A modern list library for Emacs"
1
+(define-package "dash" "20210609.1330" "A modern list library for Emacs"
2 2
   '((emacs "24"))
3
-  :commit "b9286a84975874b10493f1cb4ea051c501f51273" :authors
3
+  :commit "88d799595e8f1b4154637ce8a3f81b97b0520c1a" :authors
4 4
   '(("Magnar Sveen" . "magnars@gmail.com"))
5 5
   :maintainer
6 6
   '("Magnar Sveen" . "magnars@gmail.com")

elpa/dash-20210330.1544/dash.el → elpa/dash-20210609.1330/dash.el View File

@@ -43,10 +43,12 @@
43 43
 
44 44
 (defmacro !cons (car cdr)
45 45
   "Destructive: Set CDR to the cons of CAR and CDR."
46
+  (declare (debug (form symbolp)))
46 47
   `(setq ,cdr (cons ,car ,cdr)))
47 48
 
48 49
 (defmacro !cdr (list)
49 50
   "Destructive: Set LIST to the cdr of LIST."
51
+  (declare (debug (symbolp)))
50 52
   `(setq ,list (cdr ,list)))
51 53
 
52 54
 (defmacro --each (list &rest body)
@@ -637,6 +639,7 @@ See also: `-map-when', `-replace-first'"
637 639
 
638 640
 (defmacro --map-first (pred rep list)
639 641
   "Anaphoric form of `-map-first'."
642
+  (declare (debug (def-form def-form form)))
640 643
   `(-map-first (lambda (it) ,pred) (lambda (it) (ignore it) ,rep) ,list))
641 644
 
642 645
 (defun -map-last (pred rep list)
@@ -647,6 +650,7 @@ See also: `-map-when', `-replace-last'"
647 650
 
648 651
 (defmacro --map-last (pred rep list)
649 652
   "Anaphoric form of `-map-last'."
653
+  (declare (debug (def-form def-form form)))
650 654
   `(-map-last (lambda (it) ,pred) (lambda (it) (ignore it) ,rep) ,list))
651 655
 
652 656
 (defun -replace (old new list)
@@ -765,6 +769,7 @@ See also: `-splice-list', `-insert-at'"
765 769
 
766 770
 (defmacro --splice (pred form list)
767 771
   "Anaphoric form of `-splice'."
772
+  (declare (debug (def-form def-form form)))
768 773
   `(-splice (lambda (it) ,pred) (lambda (it) ,form) ,list))
769 774
 
770 775
 (defun -splice-list (pred new-list list)
@@ -775,6 +780,7 @@ See also: `-splice', `-insert-at'"
775 780
 
776 781
 (defmacro --splice-list (pred new-list list)
777 782
   "Anaphoric form of `-splice-list'."
783
+  (declare (debug (def-form form form)))
778 784
   `(-splice-list (lambda (it) ,pred) ,new-list ,list))
779 785
 
780 786
 (defun -cons* (&rest args)
@@ -1171,7 +1177,7 @@ See also: `-map-when'"
1171 1177
 
1172 1178
 (defmacro --update-at (n form list)
1173 1179
   "Anaphoric version of `-update-at'."
1174
-  (declare (debug (form form form)))
1180
+  (declare (debug (form def-form form)))
1175 1181
   `(-update-at ,n (lambda (it) ,form) ,list))
1176 1182
 
1177 1183
 (defun -remove-at (n list)
@@ -1228,12 +1234,12 @@ Empty lists are also removed from the result.
1228 1234
 Comparison is done by `equal'.
1229 1235
 
1230 1236
 See also `-split-when'"
1231
-  (declare (debug (form form)))
1237
+  (declare (debug (def-form form)))
1232 1238
   `(-split-when (lambda (it) (equal it ,item)) ,list))
1233 1239
 
1234 1240
 (defmacro --split-when (form list)
1235 1241
   "Anaphoric version of `-split-when'."
1236
-  (declare (debug (form form)))
1242
+  (declare (debug (def-form form)))
1237 1243
   `(-split-when (lambda (it) ,form) ,list))
1238 1244
 
1239 1245
 (defun -split-when (fn list)
@@ -1376,20 +1382,31 @@ returns the header value, but only after seeing at least one
1376 1382
 other value (the body)."
1377 1383
   (--partition-by-header (funcall fn it) list))
1378 1384
 
1385
+(defmacro --partition-after-pred (form list)
1386
+  "Partition LIST after each element for which FORM evaluates to non-nil.
1387
+Each element of LIST in turn is bound to `it' before evaluating
1388
+FORM.
1389
+
1390
+This is the anaphoric counterpart to `-partition-after-pred'."
1391
+  (let ((l (make-symbol "list"))
1392
+        (r (make-symbol "result"))
1393
+        (s (make-symbol "sublist")))
1394
+    `(let ((,l ,list) ,r ,s)
1395
+       (when ,l
1396
+         (--each ,l
1397
+           (push it ,s)
1398
+           (when ,form
1399
+             (push (nreverse ,s) ,r)
1400
+             (setq ,s ())))
1401
+         (when ,s
1402
+           (push (nreverse ,s) ,r))
1403
+         (nreverse ,r)))))
1404
+
1379 1405
 (defun -partition-after-pred (pred list)
1380
-  "Partition directly after each time PRED is true on an element of LIST."
1381
-  (when list
1382
-    (let ((rest (-partition-after-pred pred
1383
-                                       (cdr list))))
1384
-      (if (funcall pred (car list))
1385
-          ;;split after (car list)
1386
-          (cons (list (car list))
1387
-                rest)
1388
-
1389
-        ;;don't split after (car list)
1390
-        (cons (cons (car list)
1391
-                    (car rest))
1392
-              (cdr rest))))))
1406
+  "Partition LIST after each element for which PRED returns non-nil.
1407
+
1408
+This function's anaphoric counterpart is `--partition-after-pred'."
1409
+  (--partition-after-pred (funcall pred it) list))
1393 1410
 
1394 1411
 (defun -partition-before-pred (pred list)
1395 1412
   "Partition directly before each time PRED is true on an element of LIST."
@@ -1577,7 +1594,7 @@ element of LIST paired with the unmodified element of LIST."
1577 1594
 
1578 1595
 (defmacro --annotate (form list)
1579 1596
   "Anaphoric version of `-annotate'."
1580
-  (declare (debug (form form)))
1597
+  (declare (debug (def-form form)))
1581 1598
   `(-annotate (lambda (it) ,form) ,list))
1582 1599
 
1583 1600
 (defun dash--table-carry (lists restore-lists &optional re)
@@ -1662,7 +1679,7 @@ predicate PRED, in ascending order."
1662 1679
 
1663 1680
 (defmacro --find-indices (form list)
1664 1681
   "Anaphoric version of `-find-indices'."
1665
-  (declare (debug (form form)))
1682
+  (declare (debug (def-form form)))
1666 1683
   `(-find-indices (lambda (it) ,form) ,list))
1667 1684
 
1668 1685
 (defun -find-index (pred list)
@@ -1675,7 +1692,7 @@ See also `-first'."
1675 1692
 
1676 1693
 (defmacro --find-index (form list)
1677 1694
   "Anaphoric version of `-find-index'."
1678
-  (declare (debug (form form)))
1695
+  (declare (debug (def-form form)))
1679 1696
   `(-find-index (lambda (it) ,form) ,list))
1680 1697
 
1681 1698
 (defun -find-last-index (pred list)
@@ -1688,6 +1705,7 @@ See also `-last'."
1688 1705
 
1689 1706
 (defmacro --find-last-index (form list)
1690 1707
   "Anaphoric version of `-find-last-index'."
1708
+  (declare (debug (def-form form)))
1691 1709
   `(-find-last-index (lambda (it) ,form) ,list))
1692 1710
 
1693 1711
 (defun -select-by-indices (indices list)
@@ -2695,7 +2713,7 @@ if the first element should sort before the second."
2695 2713
 
2696 2714
 (defmacro --sort (form list)
2697 2715
   "Anaphoric form of `-sort'."
2698
-  (declare (debug (form form)))
2716
+  (declare (debug (def-form form)))
2699 2717
   `(-sort (lambda (it other) ,form) ,list))
2700 2718
 
2701 2719
 (defun -list (&optional arg &rest args)
@@ -2771,14 +2789,14 @@ comparing them."
2771 2789
   "Anaphoric version of `-max-by'.
2772 2790
 
2773 2791
 The items for the comparator form are exposed as \"it\" and \"other\"."
2774
-  (declare (debug (form form)))
2792
+  (declare (debug (def-form form)))
2775 2793
   `(-max-by (lambda (it other) ,form) ,list))
2776 2794
 
2777 2795
 (defmacro --min-by (form list)
2778 2796
   "Anaphoric version of `-min-by'.
2779 2797
 
2780 2798
 The items for the comparator form are exposed as \"it\" and \"other\"."
2781
-  (declare (debug (form form)))
2799
+  (declare (debug (def-form form)))
2782 2800
   `(-min-by (lambda (it other) ,form) ,list))
2783 2801
 
2784 2802
 (defun -iota (count &optional start step)
@@ -2808,6 +2826,7 @@ FN is called at least once, results are compared with `equal'."
2808 2826
 
2809 2827
 (defmacro --fix (form list)
2810 2828
   "Anaphoric form of `-fix'."
2829
+  (declare (debug (def-form form)))
2811 2830
   `(-fix (lambda (it) ,form) ,list))
2812 2831
 
2813 2832
 (defun -unfold (fun seed)
@@ -2828,7 +2847,7 @@ the new seed."
2828 2847
 
2829 2848
 (defmacro --unfold (form seed)
2830 2849
   "Anaphoric version of `-unfold'."
2831
-  (declare (debug (form form)))
2850
+  (declare (debug (def-form form)))
2832 2851
   `(-unfold (lambda (it) ,form) ,seed))
2833 2852
 
2834 2853
 (defun -cons-pair? (obj)
@@ -2877,7 +2896,7 @@ but is twice as fast as it only traverse the structure once."
2877 2896
 
2878 2897
 (defmacro --tree-mapreduce-from (form folder init-value tree)
2879 2898
   "Anaphoric form of `-tree-mapreduce-from'."
2880
-  (declare (debug (form form form form)))
2899
+  (declare (debug (def-form def-form form form)))
2881 2900
   `(-tree-mapreduce-from (lambda (it) ,form) (lambda (it acc) ,folder) ,init-value ,tree))
2882 2901
 
2883 2902
 (defun -tree-mapreduce (fn folder tree)
@@ -2899,7 +2918,7 @@ but is twice as fast as it only traverse the structure once."
2899 2918
 
2900 2919
 (defmacro --tree-mapreduce (form folder tree)
2901 2920
   "Anaphoric form of `-tree-mapreduce'."
2902
-  (declare (debug (form form form)))
2921
+  (declare (debug (def-form def-form form)))
2903 2922
   `(-tree-mapreduce (lambda (it) ,form) (lambda (it acc) ,folder) ,tree))
2904 2923
 
2905 2924
 (defun -tree-map (fn tree)
@@ -2913,7 +2932,7 @@ but is twice as fast as it only traverse the structure once."
2913 2932
 
2914 2933
 (defmacro --tree-map (form tree)
2915 2934
   "Anaphoric form of `-tree-map'."
2916
-  (declare (debug (form form)))
2935
+  (declare (debug (def-form form)))
2917 2936
   `(-tree-map (lambda (it) ,form) ,tree))
2918 2937
 
2919 2938
 (defun -tree-reduce-from (fn init-value tree)
@@ -2934,7 +2953,7 @@ two elements."
2934 2953
 
2935 2954
 (defmacro --tree-reduce-from (form init-value tree)
2936 2955
   "Anaphoric form of `-tree-reduce-from'."
2937
-  (declare (debug (form form form)))
2956
+  (declare (debug (def-form form form)))
2938 2957
   `(-tree-reduce-from (lambda (it acc) ,form) ,init-value ,tree))
2939 2958
 
2940 2959
 (defun -tree-reduce (fn tree)
@@ -2954,7 +2973,7 @@ See `-reduce-r' for how exactly are lists of zero or one element handled."
2954 2973
 
2955 2974
 (defmacro --tree-reduce (form tree)
2956 2975
   "Anaphoric form of `-tree-reduce'."
2957
-  (declare (debug (form form)))
2976
+  (declare (debug (def-form form)))
2958 2977
   `(-tree-reduce (lambda (it acc) ,form) ,tree))
2959 2978
 
2960 2979
 (defun -tree-map-nodes (pred fun tree)
@@ -2972,6 +2991,7 @@ further."
2972 2991
 
2973 2992
 (defmacro --tree-map-nodes (pred form tree)
2974 2993
   "Anaphoric form of `-tree-map-nodes'."
2994
+  (declare (debug (def-form def-form form)))
2975 2995
   `(-tree-map-nodes (lambda (it) ,pred) (lambda (it) ,form) ,tree))
2976 2996
 
2977 2997
 (defun -tree-seq (branch children tree)
@@ -2991,6 +3011,7 @@ Non-branch nodes are simply copied."
2991 3011
 
2992 3012
 (defmacro --tree-seq (branch children tree)
2993 3013
   "Anaphoric form of `-tree-seq'."
3014
+  (declare (debug (def-form def-form form)))
2994 3015
   `(-tree-seq (lambda (it) ,branch) (lambda (it) ,children) ,tree))
2995 3016
 
2996 3017
 (defun -clone (list)
@@ -3071,6 +3092,7 @@ In types: a -> b -> a"
3071 3092
 Arguments denoted by <> will be left unspecialized.
3072 3093
 
3073 3094
 See SRFI-26 for detailed description."
3095
+  (declare (debug (&optional sexp &rest &or "<>" form)))
3074 3096
   (let* ((i 0)
3075 3097
          (args (--keep (when (eq it '<>)
3076 3098
                          (setq i (1+ i))

elpa/dash-20210330.1544/dash.info → elpa/dash-20210609.1330/dash.info View File

@@ -1418,8 +1418,9 @@ Functions partitioning the input list into a list of lists.
1418 1418
               ⇒ ((2 1 1 1) (4 1 3 5) (6 6 1))
1419 1419
 
1420 1420
  -- Function: -partition-after-pred (pred list)
1421
-     Partition directly after each time PRED is true on an element of
1422
-     LIST.
1421
+     Partition LIST after each element for which PRED returns non-nil.
1422
+
1423
+     This function’s anaphoric counterpart is ‘--partition-after-pred’.
1423 1424
 
1424 1425
           (-partition-after-pred #'booleanp ())
1425 1426
               ⇒ ()
@@ -4294,7 +4295,7 @@ Index
4294 4295
                                                               (line 320)
4295 4296
 * -grade-down:                           Indexing.            (line  81)
4296 4297
 * -grade-up:                             Indexing.            (line  71)
4297
-* -group-by:                             Partitioning.        (line 193)
4298
+* -group-by:                             Partitioning.        (line 194)
4298 4299
 * -if-let:                               Binding.             (line  34)
4299 4300
 * -if-let*:                              Binding.             (line  45)
4300 4301
 * -inits:                                Reductions.          (line 222)
@@ -4348,12 +4349,12 @@ Index
4348 4349
 * -partial:                              Function combinators.
4349 4350
                                                               (line   8)
4350 4351
 * -partition:                            Partitioning.        (line  80)
4351
-* -partition-after-item:                 Partitioning.        (line 183)
4352
+* -partition-after-item:                 Partitioning.        (line 184)
4352 4353
 * -partition-after-pred:                 Partitioning.        (line 151)
4353 4354
 * -partition-all:                        Partitioning.        (line  92)
4354 4355
 * -partition-all-in-steps:               Partitioning.        (line 115)
4355
-* -partition-before-item:                Partitioning.        (line 173)
4356
-* -partition-before-pred:                Partitioning.        (line 162)
4356
+* -partition-before-item:                Partitioning.        (line 174)
4357
+* -partition-before-pred:                Partitioning.        (line 163)
4357 4358
 * -partition-by:                         Partitioning.        (line 127)
4358 4359
 * -partition-by-header:                  Partitioning.        (line 138)
4359 4360
 * -partition-in-steps:                   Partitioning.        (line 103)
@@ -4550,114 +4551,114 @@ Ref: -partition-all-in-steps46825
4550 4551
 Ref: -partition-by47307
4551 4552
 Ref: -partition-by-header47685
4552 4553
 Ref: -partition-after-pred48286
4553
-Ref: -partition-before-pred48664
4554
-Ref: -partition-before-item49049
4555
-Ref: -partition-after-item49356
4556
-Ref: -group-by49658
4557
-Node: Indexing50091
4558
-Ref: -elem-index50293
4559
-Ref: -elem-indices50688
4560
-Ref: -find-index51068
4561
-Ref: -find-last-index51557
4562
-Ref: -find-indices52061
4563
-Ref: -grade-up52466
4564
-Ref: -grade-down52873
4565
-Node: Set operations53287
4566
-Ref: -union53470
4567
-Ref: -difference53908
4568
-Ref: -intersection54320
4569
-Ref: -powerset54752
4570
-Ref: -permutations54962
4571
-Ref: -distinct55258
4572
-Node: Other list operations55632
4573
-Ref: -rotate55857
4574
-Ref: -repeat56224
4575
-Ref: -cons*56503
4576
-Ref: -snoc56919
4577
-Ref: -interpose57329
4578
-Ref: -interleave57623
4579
-Ref: -iota57989
4580
-Ref: -zip-with58472
4581
-Ref: -zip59186
4582
-Ref: -zip-lists60015
4583
-Ref: -zip-fill60713
4584
-Ref: -unzip61035
4585
-Ref: -cycle61777
4586
-Ref: -pad62176
4587
-Ref: -table62495
4588
-Ref: -table-flat63281
4589
-Ref: -first64286
4590
-Ref: -some64772
4591
-Ref: -last65256
4592
-Ref: -first-item65590
4593
-Ref: -second-item65989
4594
-Ref: -third-item66253
4595
-Ref: -fourth-item66515
4596
-Ref: -fifth-item66781
4597
-Ref: -last-item67043
4598
-Ref: -butlast67334
4599
-Ref: -sort67579
4600
-Ref: -list68065
4601
-Ref: -fix68634
4602
-Node: Tree operations69123
4603
-Ref: -tree-seq69319
4604
-Ref: -tree-map70174
4605
-Ref: -tree-map-nodes70614
4606
-Ref: -tree-reduce71461
4607
-Ref: -tree-reduce-from72343
4608
-Ref: -tree-mapreduce72943
4609
-Ref: -tree-mapreduce-from73802
4610
-Ref: -clone75087
4611
-Node: Threading macros75414
4612
-Ref: ->75639
4613
-Ref: ->>76127
4614
-Ref: -->76630
4615
-Ref: -as->77186
4616
-Ref: -some->77640
4617
-Ref: -some->>78013
4618
-Ref: -some-->78448
4619
-Ref: -doto78997
4620
-Node: Binding79550
4621
-Ref: -when-let79757
4622
-Ref: -when-let*80212
4623
-Ref: -if-let80735
4624
-Ref: -if-let*81095
4625
-Ref: -let81712
4626
-Ref: -let*87784
4627
-Ref: -lambda88721
4628
-Ref: -setq89527
4629
-Node: Side effects90328
4630
-Ref: -each90522
4631
-Ref: -each-while91043
4632
-Ref: -each-indexed91645
4633
-Ref: -each-r92231
4634
-Ref: -each-r-while92667
4635
-Ref: -dotimes93293
4636
-Node: Destructive operations93846
4637
-Ref: !cons94064
4638
-Ref: !cdr94268
4639
-Node: Function combinators94461
4640
-Ref: -partial94665
4641
-Ref: -rpartial95183
4642
-Ref: -juxt95831
4643
-Ref: -compose96283
4644
-Ref: -applify96890
4645
-Ref: -on97320
4646
-Ref: -flip97844
4647
-Ref: -const98155
4648
-Ref: -cut98493
4649
-Ref: -not98973
4650
-Ref: -orfn99282
4651
-Ref: -andfn99715
4652
-Ref: -iteratefn100209
4653
-Ref: -fixfn100911
4654
-Ref: -prodfn102467
4655
-Node: Development103525
4656
-Node: Contribute103814
4657
-Node: Contributors104826
4658
-Node: FDL106919
4659
-Node: GPL132239
4660
-Node: Index169988
4554
+Ref: -partition-before-pred48733
4555
+Ref: -partition-before-item49118
4556
+Ref: -partition-after-item49425
4557
+Ref: -group-by49727
4558
+Node: Indexing50160
4559
+Ref: -elem-index50362
4560
+Ref: -elem-indices50757
4561
+Ref: -find-index51137
4562
+Ref: -find-last-index51626
4563
+Ref: -find-indices52130
4564
+Ref: -grade-up52535
4565
+Ref: -grade-down52942
4566
+Node: Set operations53356
4567
+Ref: -union53539
4568
+Ref: -difference53977
4569
+Ref: -intersection54389
4570
+Ref: -powerset54821
4571
+Ref: -permutations55031
4572
+Ref: -distinct55327
4573
+Node: Other list operations55701
4574
+Ref: -rotate55926
4575
+Ref: -repeat56293
4576
+Ref: -cons*56572
4577
+Ref: -snoc56988
4578
+Ref: -interpose57398
4579
+Ref: -interleave57692
4580
+Ref: -iota58058
4581
+Ref: -zip-with58541
4582
+Ref: -zip59255
4583
+Ref: -zip-lists60084
4584
+Ref: -zip-fill60782
4585
+Ref: -unzip61104
4586
+Ref: -cycle61846
4587
+Ref: -pad62245
4588
+Ref: -table62564
4589
+Ref: -table-flat63350
4590
+Ref: -first64355
4591
+Ref: -some64841
4592
+Ref: -last65325
4593
+Ref: -first-item65659
4594
+Ref: -second-item66058
4595
+Ref: -third-item66322
4596
+Ref: -fourth-item66584
4597
+Ref: -fifth-item66850
4598
+Ref: -last-item67112
4599
+Ref: -butlast67403
4600
+Ref: -sort67648
4601
+Ref: -list68134
4602
+Ref: -fix68703
4603
+Node: Tree operations69192
4604
+Ref: -tree-seq69388
4605
+Ref: -tree-map70243
4606
+Ref: -tree-map-nodes70683
4607
+Ref: -tree-reduce71530
4608
+Ref: -tree-reduce-from72412
4609
+Ref: -tree-mapreduce73012
4610
+Ref: -tree-mapreduce-from73871
4611
+Ref: -clone75156
4612
+Node: Threading macros75483
4613
+Ref: ->75708
4614
+Ref: ->>76196
4615
+Ref: -->76699
4616
+Ref: -as->77255
4617
+Ref: -some->77709
4618
+Ref: -some->>78082
4619
+Ref: -some-->78517
4620
+Ref: -doto79066
4621
+Node: Binding79619
4622
+Ref: -when-let79826
4623
+Ref: -when-let*80281
4624
+Ref: -if-let80804
4625
+Ref: -if-let*81164
4626
+Ref: -let81781
4627
+Ref: -let*87853
4628
+Ref: -lambda88790
4629
+Ref: -setq89596
4630
+Node: Side effects90397
4631
+Ref: -each90591
4632
+Ref: -each-while91112
4633
+Ref: -each-indexed91714
4634
+Ref: -each-r92300
4635
+Ref: -each-r-while92736
4636
+Ref: -dotimes93362
4637
+Node: Destructive operations93915
4638
+Ref: !cons94133
4639
+Ref: !cdr94337
4640
+Node: Function combinators94530
4641
+Ref: -partial94734
4642
+Ref: -rpartial95252
4643
+Ref: -juxt95900
4644
+Ref: -compose96352
4645
+Ref: -applify96959
4646
+Ref: -on97389
4647
+Ref: -flip97913
4648
+Ref: -const98224
4649
+Ref: -cut98562
4650
+Ref: -not99042
4651
+Ref: -orfn99351
4652
+Ref: -andfn99784
4653
+Ref: -iteratefn100278
4654
+Ref: -fixfn100980
4655
+Ref: -prodfn102536
4656
+Node: Development103594
4657
+Node: Contribute103883
4658
+Node: Contributors104895
4659
+Node: FDL106988
4660
+Node: GPL132308
4661
+Node: Index170057
4661 4662
 
4662 4663
 End Tag Table
4663 4664
 

elpa/dash-20210330.1544/dir → elpa/dash-20210609.1330/dir View File


Loading…
Cancel
Save