From fb75a7fe19b0c79d4d358fdbfc14fa596c1393cb Mon Sep 17 00:00:00 2001 From: Magnar Sveen Date: Thu, 3 Jan 2013 14:01:22 +0100 Subject: [PATCH] Add @nicferrier to list of contributors. --- README.md | 16 ++++++++++++++++ dash.el | 1 + readme-template.md | 1 + 3 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 469f77d..eef76a9 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Or you can just dump `dash.el` in your load path somewhere. * [-flatten](#-flatten-l) `(l)` * [-concat](#-concat-rest-lists) `(&rest lists)` * [-mapcat](#-mapcat-fn-list) `(fn list)` +* [-cons*](#-cons-rest-args) `(&rest args)` * [-any?](#-any-pred-list) `(pred list)` * [-all?](#-all-pred-list) `(pred list)` * [-none?](#-none-pred-list) `(pred list)` @@ -216,6 +217,20 @@ Thus function `fn` should return a collection. (--mapcat (list 0 it) '(1 2 3)) ;; => '(0 1 0 2 0 3) ``` +### -cons* `(&rest args)` + +Makes a new list from the elements of `args`. + +The last 2 members of `args` are used as the final cons of the +result so if the final member of `args` is not a list the result is +a dotted list. + +```cl +(-cons* 1 2) ;; => '(1 . 2) +(-cons* 1 2 3) ;; => '(1 2 . 3) +(-cons* 1) ;; => 1 +``` + ### -any? `(pred list)` Returns t if (`pred` x) is non-nil for any x in `list`, else nil. @@ -631,6 +646,7 @@ Change `readme-template.md` or `examples-to-docs.el` instead. - [Takafumi Arakaki](https://github.com/tkf) contributed `-group-by`. - [tali713](https://github.com/tali713) is the author of `-applify`. - [Víctor M. Valenzuela](https://github.com/vemv) contributed `-repeat`. + - [Nic Ferrier](https://github.com/nicferrier) contributed `-cons*`. Thanks! diff --git a/dash.el b/dash.el index 2210506..aa5358e 100644 --- a/dash.el +++ b/dash.el @@ -697,6 +697,7 @@ Returns nil if N is less than 1." "-contains?" "-contains-p" "-repeat" + "-cons*" )) (special-variables '( "it" diff --git a/readme-template.md b/readme-template.md index ce63c28..e56c4bf 100644 --- a/readme-template.md +++ b/readme-template.md @@ -75,6 +75,7 @@ Change `readme-template.md` or `examples-to-docs.el` instead. - [Takafumi Arakaki](https://github.com/tkf) contributed `-group-by`. - [tali713](https://github.com/tali713) is the author of `-applify`. - [Víctor M. Valenzuela](https://github.com/vemv) contributed `-repeat`. + - [Nic Ferrier](https://github.com/nicferrier) contributed `-cons*`. Thanks!