guile-user
[Top][All Lists]
Advanced

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

Vector pattern matching problem when using ..1


From: Maxim Cournoyer
Subject: Vector pattern matching problem when using ..1
Date: Tue, 31 May 2022 00:07:43 -0400

Hello Guilers!

I've been trying to what seems to be a behavior discrepancy/bug in the
(@@ (ice-9 match) match) syntax.  Consider:

--8<---------------cut here---------------start------------->8---
> (match #(1 2) (#(x ..1) x))
--8<---------------cut here---------------start------------->8---
$1 = 1

But:

--8<---------------cut here---------------end--------------->8---
(match #(1 2 3) (#(x ..1) x))
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `match-error' with args `("match" "no matching pattern" #(1 2 3))'.

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
--8<---------------cut here---------------end--------------->8---

Changing ..1 which is supposed to mean 1 or more (of the previous
pattern) fixes it.

Is this expected or a bug?

Thank you!

Maxim



reply via email to

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