[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 5/6] docs/fixup: @cindex was in the wrong place
From: |
Blake Shaw |
Subject: |
[PATCH v1 5/6] docs/fixup: @cindex was in the wrong place |
Date: |
Fri, 27 Jan 2023 01:58:00 +0700 |
---
doc/ref/match.texi | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/doc/ref/match.texi b/doc/ref/match.texi
index 4f3dc86fc..5512103c4 100644
--- a/doc/ref/match.texi
+++ b/doc/ref/match.texi
@@ -23,11 +23,11 @@ The @code{(ice-9 match)} module provides a @dfn{pattern
matcher},
written by Alex Shinn, and compatible with Andrew K. Wright's pattern
matcher found in many Scheme implementations.
-@cindex pattern variable
A pattern matcher does precisely what the name implies: it matches
some arbitrary pattern, and returns some result accordingly.
-@example
+@lisp
+
(define (english-base-ten->number name)
(match name
('zero 0)
@@ -40,14 +40,21 @@ some arbitrary pattern, and returns some result accordingly.
('seven 7)
('eight 8)
('nine 9)))
+
+@end lisp
+@lisp
(english-base-ten->number 'six)
+
@result{} 6
+@end lisp
+@lisp
(apply + (map english-base-ten->number '(one two three four)))
@result{} 10
-@end example
+@end lisp
+@cindex pattern variable
Pattern matchers may contain @dfn{pattern variables}, local bindings
to all elements that match a pattern.
--
2.39.1
[PATCH v1 3/6] docs/match: add reverse nested list example, Blake Shaw, 2023/01/26
[PATCH v1 6/6] docs/match:style reviewing with pdf, adding newlines, Blake Shaw, 2023/01/26
[PATCH v1 4/6] docs/match: match-let* unwrap example, Blake Shaw, 2023/01/26
[PATCH v1 5/6] docs/fixup: @cindex was in the wrong place,
Blake Shaw <=
Re: [PATCH v1 1/6] docs/match: add pattern matching examples, Maxime Devos, 2023/01/28
Re: [PATCH v1 1/6] docs/match: add pattern matching examples, Maxime Devos, 2023/01/28
- Message not available
- Re: [PATCH v1 1/6] docs/match: add pattern matching examples, Maxime Devos, 2023/01/29
- Re: [PATCH v1 1/6] docs/match: add pattern matching examples, Blake Shaw, 2023/01/29
- Re: [PATCH v1 1/6] docs/match: add pattern matching examples, Aleix Conchillo FlaquƩ, 2023/01/30
- Re: [PATCH v1 1/6] docs/match: add pattern matching examples, Aleix Conchillo FlaquƩ, 2023/01/30
- Re: [PATCH v1 1/6] docs/match: add pattern matching examples, Maxime Devos, 2023/01/30