bug#65132: [PATCH] fix cond1 macro

Ekaitz Zarraga <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <XRbVinGjytujN-sW7mORaEcOmvJZlR33N7DxYBjlJYck4jZXrh628_FFadSjEVkgJTHXGTZeQQgWztCXSQ-nVpo6HdJIcTLS_xV8_lijHiI=@elenq.tech>
From ab6e4980ea301b5d1e14a98464e5de3e726984f1 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <[email protected]>
Date: Mon, 7 Aug 2023 20:23:42 +0200
Subject: [PATCH] fix cond1 macro

* doc/ref/api-macros.texi (Macros): Fix doc1 macro example
---
 doc/ref/api-macros.texi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/ref/api-macros.texi b/doc/ref/api-macros.texi
index 7fdf578c7..f13ac0136 100644
--- a/doc/ref/api-macros.texi
+++ b/doc/ref/api-macros.texi
@@ -229,10 +229,10 @@ Literals are used to match specific datums in an expression, like the use of
     ((cond1 test => fun)
      (let ((exp test))
        (if exp (fun exp) #f)))
-    ((cond1 test exp exp* ...)
-     (if test (begin exp exp* ...)))
     ((cond1 else exp exp* ...)
-     (begin exp exp* ...))))
+     (begin exp exp* ...))
+    ((cond1 test exp exp* ...)
+     (if test (begin exp exp* ...)))))
 
 (define (square x) (* x x))
 (cond1 10 => square)
-- 
2.41.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.