Permalink
Browse files

Add Wilfred Hughes to list of contributors.

  • Loading branch information...
1 parent dac28b0 commit 0351ca360137fe411c8704431418c94dbdb814cc @magnars committed Feb 23, 2013
Showing with 14 additions and 0 deletions.
  1. +13 −0 README.md
  2. +1 −0 readme-template.md
View
@@ -33,6 +33,7 @@ Or you can just dump `dash.el` in your load path somewhere.
* [-each-while](#-each-while-list-pred-fn) `(list pred fn)`
* [-dotimes](#-dotimes-num-fn) `(num fn)`
* [-repeat](#-repeat-n-x) `(n x)`
+* [-slice](#-slice-list-from-optional-to) `(list from &optional to)`
* [-take](#-take-n-list) `(n list)`
* [-drop](#-drop-n-list) `(n list)`
* [-take-while](#-take-while-pred-list) `(pred list)`
@@ -329,6 +330,17 @@ Returns nil if `n` is less than 1.
(-repeat 0 :a) ;; => nil
```
+### -slice `(list from &optional to)`
+
+Return copy of `list`, starting from index `from` to index `to`.
+`from` or `to` may be negative.
+
+```cl
+(-slice '(1 2 3 4 5) 1) ;; => '(2 3 4 5)
+(-slice '(1 2 3 4 5) 0 3) ;; => '(1 2 3)
+(-slice '(1 2 3 4 5) 1 -1) ;; => '(2 3 4)
+```
+
### -take `(n list)`
Returns a new list of the first `n` items in `list`, or all items if there are fewer than `n`.
@@ -702,6 +714,7 @@ Change `readme-template.md` or `examples-to-docs.el` instead.
- [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*`.
+ - [Wilfred Hughes](https://github.com/Wilfred) contributed `-slice`.
Thanks!
View
@@ -76,6 +76,7 @@ Change `readme-template.md` or `examples-to-docs.el` instead.
- [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*`.
+ - [Wilfred Hughes](https://github.com/Wilfred) contributed `-slice`.
Thanks!

0 comments on commit 0351ca3

Please sign in to comment.