Endless Parentheses

Ramblings on productivity and technical subjects.

profile for Malabarba on Stack Exchange

New on Elpa and in Emacs 25.1: seq.el

Thanks to Nicolas Petton, Emacs is getting a new built-in sequence library in 25.1, and it’s already available on GNU Elpa for everyone. There’s not much to be said about this besides the obvious “it’s about time”.

The popularity of dash.el speaks volumes about the need for this feature. Combined with the recent inclusion of if-let, when-let, and the threading macros into Emacs core, this should eventually allow most packages to phase out that extra dependency. Not that there’s anything wrong with dash, of course, but it’s nice to retire an external dependency if a built-in one becomes available.

Still, in the field of sequence-processing, there are some noteworthy differences that may lead you to prefer one over the other.

  • seq provides a unified interface for lists, vectors, and strings (i.e., sequences).
  • Some functions take arguments in a different order, such as (-take n list) versus (seq-take list n).

Are there any operations you feel ought to be added to this arsenal? What about other utility libraries that really should be built-in?

Update <2015-04-28 Tue>

This post used to say that “dash still covers a range of operations that seq doesn’t”. However, Nico seems very intent on proving me wrong, and we now have seq-difference and seq-intersection.

comments powered by Disqus