[plt-scheme] The or-pattern in match.ss
Hi all
I have become quite fond of the pattern matching facilities in match.ss.
Today I tried using the or-pattern, but can't make it work.
The simplest example that doesn't work is
> (match (list 1 2)
[(or (a 2)
(1 a)) a])
match: variables of or-pattern differ in in: (or (a 2) (1 a))
I was expecting the result to 1. Is this a bug, or have I missed something
obvious?
Note, the following works as expected.
> (match (list 1 2)
[(or (a 2)) a])
1
--
Jens Axel Søgaard