From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Blake Shaw Newsgroups: gmane.lisp.guile.devel Subject: [PATCH v1 5/6] docs/fixup: @cindex was in the wrong place Date: Fri, 27 Jan 2023 01:58:00 +0700 Message-ID: <20230126185801.19064-5-blake@reproduciblemedia.com> References: <20230126185801.19064-1-blake@reproduciblemedia.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22536"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Blake Shaw To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Jan 27 02:44:09 2023 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pLDmh-0005f3-Ts for guile-devel@m.gmane-mx.org; Fri, 27 Jan 2023 02:44:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLDmR-0004YF-Sa; Thu, 26 Jan 2023 20:43:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pL7SE-0008Sl-3d for guile-devel@gnu.org; Thu, 26 Jan 2023 13:58:34 -0500 Original-Received: from out2.migadu.com ([188.165.223.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pL7SB-0007bh-Gk for guile-devel@gnu.org; Thu, 26 Jan 2023 13:58:33 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=reproduciblemedia.com; s=key1; t=1674759510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bSxv+N1DiYqtioAgSyxSjfdFjx7bKguCdiCi41TUYyg=; b=GqjLIkUPrAEWS7rHofjroEEmtP6Cb9shX3TAu0PlhkdlfpZHDFCI+WivF0cBQeGgDoiZHN MpXe5zERVU0xvV+MmFho7WXoea7rv7puiNGNoEPWGE2zAwaRwGHzNKMpeL44FZcu7d4W6h 9Wx6qlNjJg3/XElBsizOUlQJp7BMdsc= In-Reply-To: <20230126185801.19064-1-blake@reproduciblemedia.com> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=188.165.223.204; envelope-from=blake@reproduciblemedia.com; helo=out2.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 26 Jan 2023 20:43:44 -0500 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21639 Archived-At: --- 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