Skip to content
This repository
Browse code

Add Wilfred Hughes to list of contributors.

  • Loading branch information...
commit 0351ca360137fe411c8704431418c94dbdb814cc 1 parent dac28b0
Magnar Sveen authored February 23, 2013
13  README.md
Source Rendered
@@ -33,6 +33,7 @@ Or you can just dump `dash.el` in your load path somewhere.
33 33
 * [-each-while](#-each-while-list-pred-fn) `(list pred fn)`
34 34
 * [-dotimes](#-dotimes-num-fn) `(num fn)`
35 35
 * [-repeat](#-repeat-n-x) `(n x)`
  36
+* [-slice](#-slice-list-from-optional-to) `(list from &optional to)`
36 37
 * [-take](#-take-n-list) `(n list)`
37 38
 * [-drop](#-drop-n-list) `(n list)`
38 39
 * [-take-while](#-take-while-pred-list) `(pred list)`
@@ -329,6 +330,17 @@ Returns nil if `n` is less than 1.
329 330
 (-repeat 0 :a) ;; => nil
330 331
 ```
331 332
 
  333
+### -slice `(list from &optional to)`
  334
+
  335
+Return copy of `list`, starting from index `from` to index `to`.
  336
+`from` or `to` may be negative.
  337
+
  338
+```cl
  339
+(-slice '(1 2 3 4 5) 1) ;; => '(2 3 4 5)
  340
+(-slice '(1 2 3 4 5) 0 3) ;; => '(1 2 3)
  341
+(-slice '(1 2 3 4 5) 1 -1) ;; => '(2 3 4)
  342
+```
  343
+
332 344
 ### -take `(n list)`
333 345
 
334 346
 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.
702 714
  - [tali713](https://github.com/tali713) is the author of `-applify`.
703 715
  - [Víctor M. Valenzuela](https://github.com/vemv) contributed `-repeat`.
704 716
  - [Nic Ferrier](https://github.com/nicferrier) contributed `-cons*`.
  717
+ - [Wilfred Hughes](https://github.com/Wilfred) contributed `-slice`.
705 718
 
706 719
 Thanks!
707 720
 
1  readme-template.md
Source Rendered
@@ -76,6 +76,7 @@ Change `readme-template.md` or `examples-to-docs.el` instead.
76 76
  - [tali713](https://github.com/tali713) is the author of `-applify`.
77 77
  - [Víctor M. Valenzuela](https://github.com/vemv) contributed `-repeat`.
78 78
  - [Nic Ferrier](https://github.com/nicferrier) contributed `-cons*`.
  79
+ - [Wilfred Hughes](https://github.com/Wilfred) contributed `-slice`.
79 80
 
80 81
 Thanks!
81 82
 

0 notes on commit 0351ca3

Please sign in to comment.
Something went wrong with that request. Please try again.