Skip to content

Releases: magnars/dash.el

2.20.0

12 Mar 13:23
2.20.0
fcb5d83

Choose a tag to compare

Deprecations

  • Calling -zip with two arguments now emits a warning. This long-discouraged calling convention remains supported, but the caller is now referred to the equivalent -zip-pair instead (Stefan Monnier, #400).
  • Calling -zip-pair with less than or more than two arguments is now deprecated, and can be replaced with the equivalent call to -zip-lists instead.

Fixes

  • Fixed a regression from 2.18 in -take that caused it to prematurely signal an error on improper lists (#393).

  • The function -pad can now be called with zero lists as arguments.

  • The functions -union, -intersection, and -difference now return proper sets, without duplicate elements (#397).

  • The functions -same-items? and -permutations now work on multisets (lists with duplicate elements) (#390, #397, #399).

    For example:

    (-same-items? '(1 1 2 3) '(3 1 2)) ; => t
    (-permutations '(1 1 2)) ; => '((1 1 2) (1 2 1) (2 1 1))
  • Several functions which are documented as returning a fresh, mutable object (such as a copy of one of their arguments) are no longer marked as pure. Pure functions called with constant arguments are evaluated during byte-compilation; the resulting value is an immutable constant, and thus unsafe to modify destructively. The functions in question are: -clone, -cons*, -drop-last, -interleave, -interpose, -iota, -non-nil, -repeat, -slice, -snoc, -split-at, -take, -take-last.

New features

  • The function -contains? now returns the matching tail of the list instead of just t, similarly to member (#397).
  • New function -frequencies that takes a list and counts how many times each distinct element occurs in it (suggested by @ebpa, #209, #214, #399).
  • New functions -zip-lists-fill and -unzip-lists which are better-behaved versions of -zip-fill and -unzip, respectively (#400).

2.19.1

26 Aug 11:55
2.19.1
39d067b

Choose a tag to compare

This is a bugfix point release.

  • Fixed a regression from 2.18 in -is-suffix-p which led to false negatives when parts of the suffix appeared multiple times in the list being searched (Bennett Rennier, #384).

2.19.0

08 Jul 20:19
2.19.0
2675596

Choose a tag to compare

Fixes

  • Reverted a breaking change introduced in 2.18.0 that caused the threading macro --> to be indented differently from -> and ->> (#375).
  • Added and fixed Edebug specifications for many Dash macros (Philipp Stephani, #380, #381).

New features

  • The combinators -on, -flip, -not, -andfn, and -orfn now return variadic functions that take any number of arguments (#308).
  • New combinator -rotate-args similar to -flip, but for arbitrary arglist rotations (suggested by @vapniks, #72).
  • New function -every and its anaphoric macro counterpart --every. They are like the existing -every-p and --every-p, respectively, but return the last non-nil result instead of just t.
  • New macro --partition-after-pred which affords -partition-after-pred better performance (Per Weijnitz, #362).

2.18.1

28 Feb 13:11
2.18.1
1a53e13

Choose a tag to compare

This is a bugfix point release.

  • Fixed a regression from 2.17 as well as a long-standing bug in --iterate, which evaluated its arguments one too many times. This in turn could lead to errors in -flatten-n when it tried flattening certain structures too far (#373).

2.18.0

15 Feb 20:40
2.18.0
0e97578

Choose a tag to compare

This release absorbs the now obsolete dash-functional version 1.3.0 into dash, and brings the very old version of dash on GNU ELPA up to date.

Package maintainers should replace all uses of dash-functional, which will eventually be deleted, with dash version 2.18.0. For more information on this, see: https://github.com/magnars/dash.el/wiki/Obsoletion-of-dash-functional.el

  • New function -iota for generating arithmetic sequences (@holomorph, #215).

  • Calling -list with more than one argument is now deprecated.

  • -lambda now accepts an empty argument list.

  • New anaphoric macros --reductions-from, --reductions, --reductions-r-from, and --reductions-r corresponding to the analogous non-anaphoric functions.

  • -doto threading now works as with ->.

  • New buffer-local minor mode dash-fontify-mode and globalized counterpart global-dash-fontify-mode for fontifying special Dash variables such as it, it-index, acc, etc. The minor mode also fontifies calls to Dash macros in older Emacs versions which did not dynamically detect macro calls.

    This obsoletes the user option dash-enable-fontlock and the function dash-enable-font-lock, which is now an alias of global-dash-fontify-mode.

  • New command dash-register-info-lookup for integration with C-h S (info-lookup-symbol). This command allows Dash symbols to be looked up in the Dash manual just like Elisp symbols are looked up in the Elisp manual. The command can be called directly when needed, or automatically from your user-init-file. For example:

    (with-eval-after-load 'info-look
      (dash-register-info-lookup))
  • Dash is now listed under the standard Customization groups and Finder keywords extensions and lisp.

  • The Dash manual is now licensed under the GNU Free Documentation License version 1.3.

  • Various other bug fix, performance, byte-compilation, and documentation improvements.

1.5.0

11 Jul 20:02

Choose a tag to compare

  • Add -sum and -product (Johan Andersson)

1.4.0

11 Jul 20:03

Choose a tag to compare

  • Add -sort
  • Add -reduce-r (Matus Goljer)
  • Add -reduce-r-from (Matus Goljer)

1.3.0

11 Jul 20:03

Choose a tag to compare

  • Add -partition-in-steps
  • Add -partition-all-in-steps

1.2.0

11 Jul 20:04

Choose a tag to compare

  • Add -last (Matus Goljer)
  • Add -insert-at (Emanuel Evans)
  • Add -when-let and -if-let (Emanuel Evans)
  • Add -when-let* and -if-let* (Emanuel Evans)
  • Some bugfixes