unofficial mirror of 
 help / color / mirror / Atom feed
* Vector pattern matching problem when using ..1
@ 2022-05-31  4:07 Maxim Cournoyer
  0 siblings, 0 replies; only message in thread
From: Maxim Cournoyer @ 2022-05-31  4:07 UTC (permalink / raw)
  To: guile-user

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


--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!


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-31  4:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31  4:07 Vector pattern matching problem when using ..1 Maxim Cournoyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).