Non-linear patterns Marc Nieper-Wißkirchen (25 Aug 2020 09:25 UTC)
Re: Non-linear patterns Alex Shinn (26 Aug 2020 08:26 UTC)

Non-linear patterns Marc Nieper-Wißkirchen 25 Aug 2020 09:25 UTC

What is the expected value of the following expression?

(match '(1 2)
  ((x ... x) x)
   (_ #f))

I would have thought that the value is #f because x cannot both be the
list (1) and 2. The implementation, however, yields 2.