Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (50 sloc) 2.2 KB

dash.el Build Status

A modern list api for Emacs. No 'cl required.


It's available on marmalade:

M-x package-install dash

Or you can just dump dash.el in your load path somewhere.


[[ function-list ]]

There are also anaphoric versions of these functions where that makes sense, prefixed with two dashs instead of one.

Anaphoric functions

While -map takes a function to map over the list, you can also use the anaphoric form with double dashes - which will then be executed with it exposed as the list item. Here's an example:

(-map (lambda (n) (* n n)) '(1 2 3 4)) ;; normal version

(--map (* it it) '(1 2 3 4)) ;; anaphoric version

of course the original can also be written like

(defun square (n) (* n n))

(-map 'square '(1 2 3 4))

which demonstrates the usefulness of both versions.

Documentation and examples

[[ function-docs ]]


Run the tests with


Create the docs with


I highly recommend that you install these as a pre-commit hook, so that the tests are always running and the docs are always in sync:

cp .git/hooks/pre-commit

Oh, and don't edit directly, it is auto-generated. Change or examples-to-docs.el instead.


Copyright (C) 2012 Magnar Sveen

Authors: Magnar Sveen Keywords: lists

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Jump to Line
Something went wrong with that request. Please try again.