guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comparator in match pattern


From: Vivien Kraus
Subject: Re: comparator in match pattern
Date: Wed, 28 Jun 2023 15:55:43 +0200
User-agent: Evolution 3.46.4

Le mercredi 28 juin 2023 à 15:51 +0200, Vivien Kraus a écrit :
> 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)) 
  (match (list 1 42) 
    ((c (? (cut equal? <> /))) 
     c)))

Vivien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]