[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 21/27: doc: Add unquote and unquote-splicing examples.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 21/27: doc: Add unquote and unquote-splicing examples. |
Date: |
Mon, 25 Jul 2016 09:53:46 +0000 (UTC) |
wingo pushed a commit to branch master
in repository guile.
commit ad7e806a9fdc81062be966614f03f089eac469a4
Author: Ludovic Courtès <address@hidden>
Date: Fri Jul 22 16:39:12 2016 +0200
doc: Add unquote and unquote-splicing examples.
Suggested by Vincent Legoll <address@hidden>.
* doc/ref/api-evaluation.texi (Expression Syntax): Add an unquote and an
unquote-splicing example.
---
doc/ref/api-evaluation.texi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi
index 296f1da..3a3e9e6 100644
--- a/doc/ref/api-evaluation.texi
+++ b/doc/ref/api-evaluation.texi
@@ -136,6 +136,7 @@ an expression to be evaluated and inserted. The comma
syntax @code{,}
is simply a shorthand for an @code{unquote} form. For example,
@example
+`(1 2 (* 9 9) 3 4) @result{} (1 2 (* 9 9) 3 4)
`(1 2 ,(* 9 9) 3 4) @result{} (1 2 81 3 4)
`(1 (unquote (+ 1 1)) 3) @result{} (1 2 3)
`#(1 ,(/ 12 2)) @result{} #(1 6)
@@ -153,8 +154,9 @@ the returned list inserted. @var{expr} must evaluate to a
list. The
@example
(define x '(2 3))
+`(1 ,x 4) @result{} (1 (2 3) 4)
`(1 ,@@x 4) @result{} (1 2 3 4)
-`(1 (unquote-splicing (map 1+ x))) @result{} (1 3 4)
+`(1 (unquote-splicing (map 1+ x))) @result{} (1 3 4)
`#(9 ,@@x 9) @result{} #(9 2 3 9)
@end example
- [Guile-commits] 07/27: More specific status:exit-val et al compilation guards, (continued)
- [Guile-commits] 07/27: More specific status:exit-val et al compilation guards, Andy Wingo, 2016/07/25
- [Guile-commits] 12/27: Add popen feature, Andy Wingo, 2016/07/25
- [Guile-commits] 10/27: Rename win32-uname.[ch] to posix-w32.[ch], Andy Wingo, 2016/07/25
- [Guile-commits] 16/27: Update uname implementation in posix-w32, Andy Wingo, 2016/07/25
- [Guile-commits] 22/27: Gnulib: Add dirname-lgpl., Andy Wingo, 2016/07/25
- [Guile-commits] 14/27: Fix MinGW build error, Andy Wingo, 2016/07/25
- [Guile-commits] 06/27: getaffinity, setaffinity docstring cleanup, Andy Wingo, 2016/07/25
- [Guile-commits] 13/27: Update NEWS, Andy Wingo, 2016/07/25
- [Guile-commits] 26/27: Fix --without-threads against threaded BDW-GC, Andy Wingo, 2016/07/25
- [Guile-commits] 08/27: Factor start_child out of open_process, Andy Wingo, 2016/07/25
- [Guile-commits] 21/27: doc: Add unquote and unquote-splicing examples.,
Andy Wingo <=
- [Guile-commits] 23/27: Use gnulib for basename / dirname, Andy Wingo, 2016/07/25
- [Guile-commits] 15/27: Fix unused static variables in net_db.c, Andy Wingo, 2016/07/25
- [Guile-commits] 25/27: Reimplement null-threads as inline functions, Andy Wingo, 2016/07/25
- [Guile-commits] 18/27: Allow mkstemp! to have optional "mode" argument, Andy Wingo, 2016/07/25
- [Guile-commits] 20/27: Untabify posix-w32.c, Andy Wingo, 2016/07/25
- [Guile-commits] 11/27: Add POSIX shims for MinGW, Andy Wingo, 2016/07/25
- [Guile-commits] 19/27: Improve process handling on MS-Windows, Andy Wingo, 2016/07/25