File: dash.el.html
A modern list API for Emacs.
Dash is a utility library that affords functional programming
patterns inspired by Clojure, particularly in the realm of list
manipulation. Examples include higher-order functions (map, reduce,
filter) and derivatives (drop, flatten, sum); function combinators
(partial application, argument flipping, composition); and threading
and anaphoric macros with destructuring support.
Dash is particularly useful in providing a broad and consistent API across many Emacs versions.
Documentation and examples are in the manual at Info node (dash) Top and on the web at https://elpa.gnu.org/packages/doc/dash.html, as well as in the project’s README.md file.
Defined variables (12)
-compare-fn | Tests for equality use this function, or ‘equal’ if this is nil. |
-fixfn-max-iterations | The default maximum number of iterations performed by ‘-fixfn’ |
dash--info-doc-spec | The Dash :doc-spec entry for ‘info-lookup-alist’. |
dash--keywords | Font lock keywords for ‘dash-fontify-mode’. |
dash--short-list-length | Maximum list length considered short, for optimizations. |
dash--source-counter | Monotonic counter for generated symbols. |
dash-enable-fontlock | If non-nil, fontify Dash macro calls and special variables. |
dash-fontify-mode | Non-nil if Dash-Fontify mode is enabled. |
dash-fontify-mode-hook | Hook run after entering or leaving ‘dash-fontify-mode’. |
dash-fontify-mode-lighter | Mode line lighter for ‘dash-fontify-mode’. |
global-dash-fontify-mode | Non-nil if Global Dash-Fontify mode is enabled. |
global-dash-fontify-mode-hook | Hook run after entering or leaving ‘global-dash-fontify-mode’. |
Defined functions (332)
!cdr | (LIST) |
!cons | (CAR CDR) |
---truthy? | (OBJ) |
--> | (X &rest FORMS) |
--all-p | (FORM LIST) |
--all? | (FORM LIST) |
--annotate | (FORM LIST) |
--any | (FORM LIST) |
--any-p | (FORM LIST) |
--any? | (FORM LIST) |
--count | (PRED LIST) |
--dotimes | (NUM &rest BODY) |
--doto | (INIT &rest FORMS) |
--drop-while | (FORM LIST) |
--each | (LIST &rest BODY) |
--each-indexed | (LIST &rest BODY) |
--each-r | (LIST &rest BODY) |
--each-r-while | (LIST PRED &rest BODY) |
--each-while | (LIST PRED &rest BODY) |
--every | (FORM LIST) |
--every-p | (FORM LIST) |
--every? | (FORM LIST) |
--filter | (FORM LIST) |
--find | (FORM LIST) |
--find-index | (FORM LIST) |
--find-indices | (FORM LIST) |
--find-last-index | (FORM LIST) |
--first | (FORM LIST) |
--fix | (FORM LIST) |
--group-by | (FORM LIST) |
--if-let | (VAL THEN &rest ELSE) |
--iterate | (FORM INIT N) |
--keep | (FORM LIST) |
--last | (FORM LIST) |
--map | (FORM LIST) |
--map-first | (PRED REP LIST) |
--map-indexed | (FORM LIST) |
--map-last | (PRED REP LIST) |
--map-when | (PRED REP LIST) |
--mapcat | (FORM LIST) |
--max-by | (FORM LIST) |
--min-by | (FORM LIST) |
--none-p | (FORM LIST) |
--none? | (FORM LIST) |
--only-some-p | (FORM LIST) |
--only-some? | (FORM LIST) |
--partition-after-pred | (FORM LIST) |
--partition-by | (FORM LIST) |
--partition-by-header | (FORM LIST) |
--reduce | (FORM LIST) |
--reduce-from | (FORM INIT LIST) |
--reduce-r | (FORM LIST) |
--reduce-r-from | (FORM INIT LIST) |
--reductions | (FORM LIST) |
--reductions-from | (FORM INIT LIST) |
--reductions-r | (FORM LIST) |
--reductions-r-from | (FORM INIT LIST) |
--reject | (FORM LIST) |
--reject-first | (FORM LIST) |
--reject-last | (FORM LIST) |
--remove | (FORM LIST) |
--remove-first | (FORM LIST) |
--remove-last | (FORM LIST) |
--replace-where | (PRED REP LIST) |
--select | (FORM LIST) |
--separate | (FORM LIST) |
--some | (FORM LIST) |
--some-p | (FORM LIST) |
--some? | (FORM LIST) |
--sort | (FORM LIST) |
--splice | (PRED FORM LIST) |
--splice-list | (PRED NEW-LIST LIST) |
--split-when | (FORM LIST) |
--split-with | (PRED LIST) |
--take-while | (FORM LIST) |
--tree-map | (FORM TREE) |
--tree-map-nodes | (PRED FORM TREE) |
--tree-mapreduce | (FORM FOLDER TREE) |
--tree-mapreduce-from | (FORM FOLDER INIT-VALUE TREE) |
--tree-reduce | (FORM TREE) |
--tree-reduce-from | (FORM INIT-VALUE TREE) |
--tree-seq | (BRANCH CHILDREN TREE) |
--unfold | (FORM SEED) |
--update-at | (N FORM LIST) |
--when-let | (VAL &rest BODY) |
--zip-with | (FORM LIST1 LIST2) |
-> | (X &optional FORM &rest MORE) |
->> | (X &optional FORM &rest MORE) |
-all-p | (PRED LIST) |
-all? | (PRED LIST) |
-andfn | (&rest PREDS) |
-annotate | (FN LIST) |
-any | (PRED LIST) |
-any-p | (PRED LIST) |
-any? | (PRED LIST) |
-applify | (FN) |
-as-> | (VALUE VARIABLE &rest FORMS) |
-butlast | (LIST) |
-clone | (LIST) |
-common-prefix | (&rest LISTS) |
-common-suffix | (&rest LISTS) |
-compose | (&rest FNS) |
-concat | (&rest SEQUENCES) |
-cons* | (&rest ARGS) |
-cons-pair-p | (OBJ) |
-cons-pair? | (OBJ) |
-cons-to-list | (CON) |
-const | (C) |
-contains-p | (LIST ELEMENT) |
-contains? | (LIST ELEMENT) |
-copy | (LIST) |
-count | (PRED LIST) |
-counter | (&optional BEG END INC) |
-cut | (&rest PARAMS) |
-cycle | (LIST) |
-difference | (LIST1 LIST2) |
-distinct | (LIST) |
-dotimes | (NUM FN) |
-doto | (INIT &rest FORMS) |
-drop | (N LIST) |
-drop-last | (N LIST) |
-drop-while | (PRED LIST) |
-each | (LIST FN) |
-each-indexed | (LIST FN) |
-each-r | (LIST FN) |
-each-r-while | (LIST PRED FN) |
-each-while | (LIST PRED FN) |
-elem-index | (ELEM LIST) |
-elem-indices | (ELEM LIST) |
-every | (PRED LIST) |
-every-p | (PRED LIST) |
-every? | (PRED LIST) |
-fifth-item | (LIST) |
-filter | (PRED LIST) |
-find | (PRED LIST) |
-find-index | (PRED LIST) |
-find-indices | (PRED LIST) |
-find-last-index | (PRED LIST) |
-first | (PRED LIST) |
-first-item | (LIST) |
-fix | (FN LIST) |
-fixfn | (FN &optional EQUAL-TEST HALT-TEST) |
-flatten | (L) |
-flatten-n | (NUM LIST) |
-flip | (FN) |
-fourth-item | (LIST) |
-frequencies | (LIST) |
-grade-down | (COMPARATOR LIST) |
-grade-up | (COMPARATOR LIST) |
-group-by | (FN LIST) |
-if-let | ((VAR VAL) THEN &rest ELSE) |
-if-let* | (VARS-VALS THEN &rest ELSE) |
-inits | (LIST) |
-insert-at | (N X LIST) |
-interleave | (&rest LISTS) |
-interpose | (SEP LIST) |
-intersection | (LIST1 LIST2) |
-iota | (COUNT &optional START STEP) |
-is-infix-p | (INFIX LIST) |
-is-infix? | (INFIX LIST) |
-is-prefix-p | (PREFIX LIST) |
-is-prefix? | (PREFIX LIST) |
-is-suffix-p | (SUFFIX LIST) |
-is-suffix? | (SUFFIX LIST) |
-iterate | (FUN INIT N) |
-iteratefn | (FN N) |
-juxt | (&rest FNS) |
-keep | (FN LIST) |
-lambda | (MATCH-FORM &rest BODY) |
-last | (PRED LIST) |
-last-item | (LIST) |
-let | (VARLIST &rest BODY) |
-let* | (VARLIST &rest BODY) |
-list | (ARG) |
-map | (FN LIST) |
-map-first | (PRED REP LIST) |
-map-indexed | (FN LIST) |
-map-last | (PRED REP LIST) |
-map-when | (PRED REP LIST) |
-mapcat | (FN LIST) |
-max | (LIST) |
-max-by | (COMPARATOR LIST) |
-min | (LIST) |
-min-by | (COMPARATOR LIST) |
-non-nil | (LIST) |
-none-p | (PRED LIST) |
-none? | (PRED LIST) |
-not | (PRED) |
-on | (OP TRANS) |
-only-some-p | (PRED LIST) |
-only-some? | (PRED LIST) |
-orfn | (&rest PREDS) |
-pad | (FILL-VALUE &rest LISTS) |
-partial | (FUN &rest ARGS) |
-partition | (N LIST) |
-partition-after-item | (ITEM LIST) |
-partition-after-pred | (PRED LIST) |
-partition-all | (N LIST) |
-partition-all-in-steps | (N STEP LIST) |
-partition-before-item | (ITEM LIST) |
-partition-before-pred | (PRED LIST) |
-partition-by | (FN LIST) |
-partition-by-header | (FN LIST) |
-partition-in-steps | (N STEP LIST) |
-permutations | (LIST) |
-powerset | (LIST) |
-prodfn | (&rest FNS) |
-product | (LIST) |
-reduce | (FN LIST) |
-reduce-from | (FN INIT LIST) |
-reduce-r | (FN LIST) |
-reduce-r-from | (FN INIT LIST) |
-reductions | (FN LIST) |
-reductions-from | (FN INIT LIST) |
-reductions-r | (FN LIST) |
-reductions-r-from | (FN INIT LIST) |
-reject | (PRED LIST) |
-reject-first | (PRED LIST) |
-reject-last | (PRED LIST) |
-remove | (PRED LIST) |
-remove-at | (N LIST) |
-remove-at-indices | (INDICES LIST) |
-remove-first | (PRED LIST) |
-remove-item | (ITEM LIST) |
-remove-last | (PRED LIST) |
-repeat | (N X) |
-replace | (OLD NEW LIST) |
-replace-at | (N X LIST) |
-replace-first | (OLD NEW LIST) |
-replace-last | (OLD NEW LIST) |
-replace-where | (PRED REP LIST) |
-rotate | (N LIST) |
-rotate-args | (N FN) |
-rpartial | (FN &rest ARGS) |
-running-product | (LIST) |
-running-sum | (LIST) |
-same-items-p | (LIST1 LIST2) |
-same-items? | (LIST1 LIST2) |
-second-item | (LIST) |
-select | (PRED LIST) |
-select-by-indices | (INDICES LIST) |
-select-column | (COLUMN TABLE) |
-select-columns | (COLUMNS TABLE) |
-separate | (PRED LIST) |
-setq | ([MATCH-FORM VAL]...) |
-slice | (LIST FROM &optional TO STEP) |
-snoc | (LIST ELEM &rest ELEMENTS) |
-some | (PRED LIST) |
-some--> | (EXPR &rest FORMS) |
-some-> | (X &optional FORM &rest MORE) |
-some->> | (X &optional FORM &rest MORE) |
-some-p | (PRED LIST) |
-some? | (PRED LIST) |
-sort | (COMPARATOR LIST) |
-splice | (PRED FUN LIST) |
-splice-list | (PRED NEW-LIST LIST) |
-split-at | (N LIST) |
-split-on | (ITEM LIST) |
-split-when | (FN LIST) |
-split-with | (PRED LIST) |
-sum | (LIST) |
-table | (FN &rest LISTS) |
-table-flat | (FN &rest LISTS) |
-tails | (LIST) |
-take | (N LIST) |
-take-last | (N LIST) |
-take-while | (PRED LIST) |
-third-item | (LIST) |
-tree-map | (FN TREE) |
-tree-map-nodes | (PRED FUN TREE) |
-tree-mapreduce | (FN FOLDER TREE) |
-tree-mapreduce-from | (FN FOLDER INIT-VALUE TREE) |
-tree-reduce | (FN TREE) |
-tree-reduce-from | (FN INIT-VALUE TREE) |
-tree-seq | (BRANCH CHILDREN TREE) |
-unfold | (FUN SEED) |
-union | (LIST1 LIST2) |
-uniq | (LIST) |
-unzip | (LISTS) |
-unzip-lists | (LISTS) |
-update-at | (N FUNC LIST) |
-value-to-list | (VAL) |
-when-let | ((VAR VAL) &rest BODY) |
-when-let* | (VARS-VALS &rest BODY) |
-zip | (&rest LISTS) |
-zip-fill | (FILL-VALUE &rest LISTS) |
-zip-lists | (&rest LISTS) |
-zip-lists-fill | (FILL-VALUE &rest LISTS) |
-zip-pair | (LIST1 LIST2) |
-zip-with | (FN LIST1 LIST2) |
dash--assoc-fn | () |
dash--get-expand-function | (TYPE) |
dash--hash-test-fn | () |
dash--info-elisp-docs | () |
dash--length= | (LIST LENGTH) |
dash--lex-perms | (VEC &optional ORIGINAL) |
dash--match | (MATCH-FORM SOURCE) |
dash--match-cons | (MATCH-FORM SOURCE) |
dash--match-cons-1 | (MATCH-FORM SOURCE &optional PROPS) |
dash--match-cons-get-car | (SKIP-CDR SOURCE) |
dash--match-cons-get-cdr | (SKIP-CDR SOURCE) |
dash--match-cons-skip-cdr | (SKIP-CDR SOURCE) |
dash--match-ignore-place-p | (SYMBOL) |
dash--match-kv | (MATCH-FORM SOURCE) |
dash--match-kv-1 | (MATCH-FORM SOURCE TYPE) |
dash--match-kv-normalize-match-form | (PATTERN) |
dash--match-make-source-symbol | () |
dash--match-symbol | (MATCH-FORM SOURCE) |
dash--match-vector | (MATCH-FORM SOURCE) |
dash--match-vector-1 | (MATCH-FORM SOURCE) |
dash--member-fn | () |
dash--multi-perms | (LIST FREQS) |
dash--next-lex-perm | (ARRAY N) |
dash--normalize-let-varlist | (VARLIST) |
dash--numbers<= | (NUMS) |
dash--partition-all-in-steps-reversed | (N STEP LIST) |
dash--size+ | (SIZE1 SIZE2) |
dash--table-carry | (LISTS RESTORE-LISTS &optional RE) |
dash--take | (N LIST) |
dash--turn-on-fontify-mode | () |
dash--uniq-perms | (LIST) |
dash--zip-lists-or-pair | (FORM &rest LISTS) |
dash-enable-font-lock | (&optional ARG) |
dash-expand:&alist | (KEY SOURCE) |
dash-expand:&hash | (KEY SOURCE) |
dash-expand:&hash? | (KEY SOURCE) |
dash-expand:&keys | (KEY SOURCE) |
dash-expand:&plist | (KEY SOURCE) |
dash-fontify-mode | (&optional ARG) |
dash-register-info-lookup | () |
dash-unload-function | () |
global-dash-fontify-mode | (&optional ARG) |