[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 2/6] docs/match: rm unquote-splicing as it interferes with tex
From: |
Blake Shaw |
Subject: |
[PATCH v1 2/6] docs/match: rm unquote-splicing as it interferes with textinfo |
Date: |
Fri, 27 Jan 2023 01:57:57 +0700 |
don't know how to fix this rn, but...
---
doc/ref/match.texi | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/doc/ref/match.texi b/doc/ref/match.texi
index 105150886..c5017e1a5 100644
--- a/doc/ref/match.texi
+++ b/doc/ref/match.texi
@@ -80,10 +80,10 @@ Patterns can be composed and nested. For instance,
@code{...}
times in a list:
@example
-(match '(((a b c) e f g) 1 2 3)
- (((head ...) tails ...)
- `(,@tails ,head)))
-@result{} (1 2 3 ((a b c) e f g))
+(match lst
+ (((heads tails ...) ...)
+ heads))
+@result{}
@end example
@noindent
@@ -97,10 +97,11 @@ A pattern matcher can match an object against several
patterns and
extract the elements that make it up.
@example
-(let ((m '((a . b) (c . d) (e . f))))
+(let ((m '((l1 . r1) (l2 . r2) (l3 . r3))))
(match m
- (((left . right) ...) left)))
-@result{} (a c e)
+ (((left . right) ...)
+ (list left right))))
+@result{} ((l1 l2 l3) (r1 r2 r3))
@end example
@example
--
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, 2023/01/26
Re: [PATCH v1 1/6] docs/match: add pattern matching examples, Maxime Devos, 2023/01/28