From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vivien Kraus Newsgroups: gmane.lisp.guile.user Subject: Re: comparator in match pattern Date: Wed, 28 Jun 2023 15:55:43 +0200 Message-ID: References: <54a4a4766d2316d737c299491c6f750af369bb33.camel@planete-kraus.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3172"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.46.4 To: Damien Mattei , guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Jun 28 15:52:15 2023 Return-path: Envelope-to: guile-user@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 1qEVag-0000cM-HE for guile-user@m.gmane-mx.org; Wed, 28 Jun 2023 15:52:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEVaW-0001o4-8n; Wed, 28 Jun 2023 09:52:04 -0400 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 1qEVaT-0001nZ-9Z for guile-user@gnu.org; Wed, 28 Jun 2023 09:52:01 -0400 Original-Received: from planete-kraus.eu ([2a00:5881:4008:2810::309]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1qEVaR-0002bi-Ku for guile-user@gnu.org; Wed, 28 Jun 2023 09:52:01 -0400 Original-Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id dc883645; Wed, 28 Jun 2023 13:51:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:subject:from:to:date:in-reply-to:references :content-type:content-transfer-encoding:mime-version; s=dkim; bh=iUw9WNQyKMEm4U6tdT3BriXDU4I=; b=jkeZdjt5uBeCmmFBGIDGFSSwe0xC 9x4nOQpZYoXDhl2O0CYtqH/MKWY6ryvXz+rvPMmcfmR+8Jv+8hImVI5u+pbxk0Ub ID5GYDgFblZ/Tu/Asvg4gZdw22exJiqMfr5NDOEnaxnwryknsA+SWW3R1UgjQfeA K1eg4Kp2+at2uXs= Original-Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 4b3845bd (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 28 Jun 2023 13:51:55 +0000 (UTC) In-Reply-To: Received-SPF: pass client-ip=2a00:5881:4008:2810::309; envelope-from=vivien@planete-kraus.eu; helo=planete-kraus.eu 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19078 Archived-At: Le mercredi 28 juin 2023 =C3=A0 15:51 +0200, Vivien Kraus a =C3=A9crit=C2= =A0: > So, you want to match against the / symbol, not the value of a > variable > named /? Sorry, I misread. You actually have a variable named /. So this code is the only relevant one: (use-modules (ice-9 match) (srfi srfi-26)) (let ((/ 42))=20 (match (list 1 42)=20 ((c (? (cut equal? <> /)))=20 c))) Vivien