mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
Manual: fix 'my-or' examples to use let-bound variable.
Fixes <http://bugs.gnu.org/14203> reported by Nikita Karetnikov. * doc/ref/api-macros.texi (Defining Macros, Syntax Rules): Fix definition of 'my-or' example macro to use the let-bound variable.
This commit is contained in:
parent
72d4abda1d
commit
e006d87ba5
1 changed files with 4 additions and 4 deletions
|
@ -122,8 +122,8 @@ same @var{letrec-syntax}.
|
||||||
exp)
|
exp)
|
||||||
((my-or exp rest ...)
|
((my-or exp rest ...)
|
||||||
(let ((t exp))
|
(let ((t exp))
|
||||||
(if exp
|
(if t
|
||||||
exp
|
t
|
||||||
(my-or rest ...)))))))
|
(my-or rest ...)))))))
|
||||||
(my-or #f "rockaway beach"))
|
(my-or #f "rockaway beach"))
|
||||||
@result{} "rockaway beach"
|
@result{} "rockaway beach"
|
||||||
|
@ -323,8 +323,8 @@ Consider the definition of @code{my-or} from the previous section:
|
||||||
exp)
|
exp)
|
||||||
((my-or exp rest ...)
|
((my-or exp rest ...)
|
||||||
(let ((t exp))
|
(let ((t exp))
|
||||||
(if exp
|
(if t
|
||||||
exp
|
t
|
||||||
(my-or rest ...))))))
|
(my-or rest ...))))))
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue