guile-commits
[Top][All Lists]
Advanced

[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
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]