[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 8707aaf 367/426: Update docs
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 8707aaf 367/426: Update docs |
Date: |
Tue, 04 Aug 2015 19:38:56 +0000 |
branch: externals/dash
commit 8707aafd9608809d5366859d9e5c51b1e7d8a9d4
Author: Fredrik Bergroth <address@hidden>
Commit: Fredrik Bergroth <address@hidden>
Update docs
---
README.md | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 35bf929..3b89a12 100644
--- a/README.md
+++ b/README.md
@@ -1663,17 +1663,21 @@ Convenient versions of `let` and `let*` constructs
combined with flow control.
If `val` evaluates to non-nil, bind it to `var` and execute body.
`var-val` should be a (`var` `val`) pair.
+Note: binding is done according to `-let`.
+
```cl
(-when-let (match-index (string-match "d" "abcd")) (+ match-index 2)) ;; => 5
-(--when-let (member :b '(:a :b :c)) (cons :d it)) ;; => '(:d :b :c)
-(--when-let (even? 3) (cat it :a)) ;; => nil
+(-when-let ((&plist :foo foo) (list :foo "foo")) foo) ;; => "foo"
+(-when-let ((&plist :foo foo) (list :bar "bar")) foo) ;; => nil
```
#### -when-let* `(vars-vals &rest body)`
If all `vals` evaluate to true, bind them to their corresponding
`vars` and execute body. `vars-vals` should be a list of (`var` `val`)
-pairs (corresponding to bindings of `let*`).
+pairs.
+
+Note: binding is done according to `-let`.
```cl
(-when-let* ((x 5) (y 3) (z (+ y 4))) (+ x y z)) ;; => 15
@@ -1685,6 +1689,8 @@ pairs (corresponding to bindings of `let*`).
If `val` evaluates to non-nil, bind it to `var` and do `then`,
otherwise do `else`. `var-val` should be a (`var` `val`) pair.
+Note: binding is done according to `-let`.
+
```cl
(-if-let (match-index (string-match "d" "abc")) (+ match-index 3) 7) ;; => 7
(--if-let (even? 4) it nil) ;; => t
@@ -1694,11 +1700,14 @@ otherwise do `else`. `var-val` should be a (`var`
`val`) pair.
If all `vals` evaluate to true, bind them to their corresponding
`vars` and do `then`, otherwise do `else`. `vars-vals` should be a list
-of (`var` `val`) pairs (corresponding to the bindings of `let*`).
+of (`var` `val`) pairs.
+
+Note: binding is done according to `-let`.
```cl
(-if-let* ((x 5) (y 3) (z 7)) (+ x y z) "foo") ;; => 15
(-if-let* ((x 5) (y nil) (z 7)) (+ x y z) "foo") ;; => "foo"
+(-if-let* (((_ _ x) '(nil nil 7))) x) ;; => 7
```
#### -let `(varlist &rest body)`
- [elpa] externals/dash 0310e0e 359/426: Update docs, (continued)
- [elpa] externals/dash 0310e0e 359/426: Update docs, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0fc5d73 351/426: [-let] Make the cons matcher temp-bind as late as possible, Phillip Lord, 2015/08/04
- [elpa] externals/dash 75d29a2 363/426: Declare --iterate macro before using it. #102, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3bdf60b 365/426: Add some examples, Phillip Lord, 2015/08/04
- [elpa] externals/dash 65a3736 349/426: [-let] Fix improper list non-symbol last argument handler, Phillip Lord, 2015/08/04
- [elpa] externals/dash 549bfd3 366/426: Reorder macros to make sure they are declared before being used, Phillip Lord, 2015/08/04
- [elpa] externals/dash db7f651 353/426: [-let] Simplify the conditions in dash--match-cons-1, Phillip Lord, 2015/08/04
- [elpa] externals/dash c6b92ae 324/426: Reorder the examples into more meaningful blocks, Phillip Lord, 2015/08/04
- [elpa] externals/dash 03b98ca 364/426: Make -if-let and -when-let families destructure their arguments, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5e9c1a9 373/426: Add Fredrik Bergroth to the list of contributors, Phillip Lord, 2015/08/04
- [elpa] externals/dash 8707aaf 367/426: Update docs,
Phillip Lord <=
- [elpa] externals/dash 63fa64f 368/426: Add links to references in readme, Phillip Lord, 2015/08/04
- [elpa] externals/dash d459b49 374/426: Fix typo, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9e1a667 360/426: Do not map nodes on conses (be consistent with tree map), Phillip Lord, 2015/08/04
- [elpa] externals/dash 7185db8 311/426: [Issue #83] Add `step` to `-slice`, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2b69c14 411/426: Add dash.info and dash.texi to repo, Phillip Lord, 2015/08/04
- [elpa] externals/dash c61fc34 417/426: Add -remove-first/last, -map-first/last, -replace-first/last, Phillip Lord, 2015/08/04
- [elpa] externals/dash fb51f8f 304/426: Merge pull request #88 from steventlamb/topic/zip_cycle_pad, Phillip Lord, 2015/08/04
- [elpa] externals/dash d0c6fc0 371/426: Merge pull request #104 from fbergroth/linkify-docs, Phillip Lord, 2015/08/04
- [elpa] externals/dash c08fcba 299/426: Fixed documentation of `-last-item'., Phillip Lord, 2015/08/04
- [elpa] externals/dash f96196a 289/426: Merge pull request #75 from Fuco1/prefix, Phillip Lord, 2015/08/04